We have 3 Equations:
Eq. 2) A=2B
Eq. 3) C=A+5
Notice that all three equations have the variable A. What we want to do is to replace B and C in Eq. 1 in terms of A. If we solve Eq. 2 for B, we get that B=(1/2)A. Note that in Eq. 3, C is already solved in terms of A. Now we substitute B=(1/2)A and C=A+5 in to Eq. 1:
35=A+(1/2)A+A+5 (Add like terms)
35=2.5A+5 (subtract 5 from both sides)
30=2.5A (divide by 2.5 on both sides)
Now plug in A=12 in to Eq. 2, and we find that B=6.
Finally, plug A=12 in to Eq. 3, and we find that C=17.
So P=A+B+C, and 35=12+6+17
Additionally, you can also put Eq. 1 in terms of B as the other answer states, and solve for B.
I hope that helps!