This should help:

Simplifying
3p + -1 = 5(p + -1) + -2(7 + -2p)
Reorder the terms:
-1 + 3p = 5(p + -1) + -2(7 + -2p)
Reorder the terms:
-1 + 3p = 5(-1 + p) + -2(7 + -2p)
-1 + 3p = (-1 * 5 + p * 5) + -2(7 + -2p)
-1 + 3p = (-5 + 5p) + -2(7 + -2p)
-1 + 3p = -5 + 5p + (7 * -2 + -2p * -2)
-1 + 3p = -5 + 5p + (-14 + 4p)
Reorder the terms:
-1 + 3p = -5 + -14 + 5p + 4p
Combine like terms: -5 + -14 = -19
-1 + 3p = -19 + 5p + 4p
Combine like terms: 5p + 4p = 9p
-1 + 3p = -19 + 9p
Solving
-1 + 3p = -19 + 9p
Solving for variable 'p'.
Move all terms containing p to the left, all other terms to the right.
Add '-9p' to each side of the equation.
-1 + 3p + -9p = -19 + 9p + -9p
Combine like terms: 3p + -9p = -6p
-1 + -6p = -19 + 9p + -9p
Combine like terms: 9p + -9p = 0
-1 + -6p = -19 + 0
-1 + -6p = -19
Add '1' to each side of the equation.
-1 + 1 + -6p = -19 + 1
Combine like terms: -1 + 1 = 0
0 + -6p = -19 + 1
-6p = -19 + 1
Combine like terms: -19 + 1 = -18
-6p = -18
Divide each side by '-6'.
p = 3
Simplifying
p = 3