A hollow circular tube A fits over the end of

A hollow circular tube A fits over the end of a solid circular bar B, as shown in the figure. The far ends of both bars are fixed. Initially, a hole through bar B makes an angle ( with a line through two holes in tube A. Then bar B is twisted until the holes are aligned, and a pin is placed through the holes.
When bar B is released and the system returns to equilibrium, what is the total strain energy U of the two bars? (Let IPA and IPB represent the polar moments of inertia of bars A and B, respectively. The length L and shear modulus of elasticity G are the same for both bars.)
A hollow circular tube A fits over the end of