Prove that the projection of A on B is equal to A.b

Use a right triangle, you will see that the component of A on B is A cosAngle