Question 1006594
"A function p(x) has a value of 5 when x>0 and a value of -5 when x<0."


is the same as saying


p(x) = 5 when x > 0
OR
p(x) = -5 when x < 0


it depends on the value of x. If x is positive, then the function is p(x) = 5. OR, if x is negative, then p(x) = -5. It is impossible for p(x) to be both at the same time since x can't be both positive and negative at the same time.


We need to find p(3) first. This is p(x) when x = 3.
x = 3 makes x > 0 true. Ie, 3 is positive
so p(x) = 5 and p(3) = 5


Notice how we don't even bother with p(x) = -5 because x = 3 is NOT negative.


-----------------------------------------------------------------


now we plug that into q(x) like you did and we get 


q(5) = 5^2-4 = 21


so q(p(3)) = 21