Potential energy of bolt = mgh = 0.3 x 9.8 x 8.82 J
The bolt does not rebound. Therefore, the whole of the energy is converted into heat. Since the value of acceleration due to gravity is the same in all inertial systems, therefore, the answer will not change even if the elevator is stationary.