If P=8, Then you would plug in 8 for P.
4(8)-2 = 30
Hope this helps :)
<h3>
Answers:</h3>

================================================
Work Shown:
Part 1

Notice how I replaced every x with g(x) in step 2. Then I plugged in g(x) = x^2+6 and simplified.
------------------
Part 2

In step 4, I used the rule (a+b)^2 = a^2+2ab+b^2
In this case, a = sqrt(x-1) and b = 5.
You could also use the box method as a visual way to expand out 
Its A. the side lengths squared equal the hypotenuse squared.
Answer:
area of the BCD triangle=1/2×10×9
=45
area of the ABD triangle=1/2×10×3
=15
Total area=45+15
=60 square centimetres