I have looked on here for an answer to my question however the answers I found were how to find the actual angle and not broken down into theida and phi so here is my question:
If I have two vectors a and b how can I calculate the two Euler angles between them?
I do know the total angle is found by:
=arccos(Re(a⋅b)∥a∥∥b∥)
What I am looking for is this scenario:
where the red line is vector a and the purple line is vector b. The angle between them can be broke up onto the two planes. Those two angles are what I am trying to find.

So given vector A = (2i,4j,5k) and vector B = (1i,3j,8k)
my theida (as shown in image above) would be:
Therefore,
cos(theida) = (2*1) + (5*8) / (sqrt(2^2 + 5^2) * sqrt(1^2+8^2))
theida = acos(42/(sqrt(29)*sqrt(65)))
theida = 14.68 deg
and similarly:
Therefore,
cos(phi) = (2*1) + (4*3) / (sqrt(2^2 + 4^2) * sqrt(1^2+3^2))
phi= acos(14/(sqrt(20)*sqrt(10)))
phi= 8.13 deg