Hi,
it's a high school trigonometry:
Write eq. 24 separately for x,y,z components, the resulting eqs denote (1), (2), (3) respectively.
Divide (2) by (3) lhs by lhs, rhs by rhs, using tan x = sin x / cos x you get eq. 25.
Add square of (2) and square of (3) and take a square root of it, this yields
sqrt(Gpy^2+Gpz^2)/Gp = cos theta, using the identity (sin x)^2 + (cos x)^2=1; denote this (4).
Now divide eq. (1) by (4) and reverse the sign -> you get eq. 26.