Now we move VA^2 sin^2(theta) to the right hand side
VB = VA0^2 - 2 VA0 VA cos(theta) + VA^2 cos^2(theta) + VA^2 sin^2(theta) .
The trig identity
cos^2(phi) + sin^2(phi) = 1
is valid for any choice of phi. We can also say
cos^2(theta) + sin^2(theta) = 1
So we have
VB = VA0^2 - 2 VA0 VA cos(theta) + VA^2 .
This still involves VA, but we can solve this by using (3) (energy conservation). We have, from (3):
VA = sqrt(VA0^2 + VB^2)
So substituting this into the preceeding equation gives
VB^2 = VA0^2 - 2 VA0 sqrt(VA0^2 + VB^2) cos(theta) + VA0^2 + VB^2
Cancelling and collecting terms:
0 = 2VA0^2 - 2VA0 sqrt(VA0^2 + VB^2) cos(theta)
Rearranging:
sqrt(VA0^2 + VB^2) cos(theta) = VA0
Squaring:
(VA0^2 + VB^2)cos^2(theta) = VA0^2
So
VB^2 cos^2(theta) = VA0^2(1-cos^2(theta) ) = VA0^2 sin^2(theta)
[from trig identity]
Hence
VB = VA0 tan(theta)