it's just re-arranged algebraically.
the real equation, in the normal human form is this;
(P - (A . P)A) * cos + (AxP)sin + (A.P)A
the final they give is:
Pcos + (AxP)sin + A(A.P)(1-cos)
the 1-cos comes from the P-(A.P)A. In my code, I use the first version
P - (A.P)A gives you the perpendicular component. This is hard to explain if you don't already understand it, but A.P gives you a length (its a dotproduct), and when you multiply that by A (which should be a normalized unit vector) you get the vector component that is the projection of P onto A. When you subtract the projection of P onto A from P it gives you the perpendicular component.
you don't need the last part in the normal human form of the equation if the vectors are already orthogonal, but if they aren't already orthogonal you need to add it in in order for it to represent a rotation (preserve lengths).