If you get FrameA and FrameB directionvectors you should be able to get the "cos(angle)" by normalizing the directionvectors and calculate the dotproduct from them.
Then use Acos() on the dotproduct to get the angle in degrees.
Then use Acos() on the dotproduct to get the angle in degrees.