If cos x = p2/1, then tan x =?
If you draw a right angled triangle and put the know things on it you will easily understand what Chris has done.
If you need visual help then ask for it!
If cos x = p2/1, then tan x
Using the Pythagorean Theorem,
y = √[1 - (p2)^2]
So tan x = √[1 - (p2)^2] / p2
Note.....depending upon the quadrant where x falls, this could be negative, as well