tension in the thread =mg+ma→ [ Psuedo force]
tension=m(g+a)
now, we have to find displacement of elevator.
use formula, S=ut+12At2
here A is net acceleration acts on elevator.
here u=0,A=a [ upward direction]
so, S=0+12at2
hence, displacement is 12at2
now, workdone = Tension × displacement
=m(g+a)×12at2
=12m(g+a)at2Joule