The correct option is C 9kq28a
Initial potential energy of the system
Uinitial=∑Uself+Uinteraction
Substituting the values,
⇒Uinitial=kq22a+kq22×2a+(kq22a)
∴Uinitial=5kq24a
When the inner sphere is grounded let's assume q′ be the final charge on inner sphere such that electric potential on it, Vinner=0,
⇒kq′a+kq2a=0
⇒q′=−q2
Final energy Ufinal of the system:
Ufinal=∑Uself+Uinteraction
⇒Ufinal=kq′22a+kq22(2a)+kq′2aq
⇒Ufinal=kq28a+kq24a−kq24a
⇒Ufinal=kq28a
Amount of Heat produced
=(Ui−Uf)
=5kq24a−kq28a
=9kq28a
Hence, option (c) is the correct answer.