make p the subject in both equtions

ap+b=c-dp

q - 1/2 p=6-3q

ap+b=c-dp

Add dp and subtract b from both sides of equation.

ap + dp = c- b

p(a+d) = c-b

Divide both sides by a+d.

p = (c-b)/(a+d)

I'll let you do the second equation.