Let the deformation in the spring be Δl, when the rod AB has attained the angular velocity ω. From the second law of motion in projection form Fn=mwn.
κΔl=mω2(l0+Δl) or, Δl=mω2l0κ−mω2
From the energy equation, Aext=12mv2+12κΔl2
=12mω2(l0+Δl)2+12κΔl2
=12mω2(l0+mω2l0κ−mω2)2+12κ(mω2l0κ−mω2)2
On solving Aext=κ2l20η(1+η)(1−η)2, where η=mω2κ