Well, the question is asking you to transform the equation into ' p = ...'
and it's not that you just have to divide the 'a' from both sides giving the answer as p = (px+c) ÷ a, but you have to write in terms of ' a,x and c'.
so ap = px+c
1)collect all the likes to one side (ap - px = c)
2) Take the common out [ p(a-x) = c ]
3) Divide by '(a-x)' to put equation in terms of "p="
4) therfore, p = c ÷ (a-x)
Hope this answered your question