Since energy cannot be created nor destroyed, the change in energy of the electron must be equal to the energy of the emitted photon.
The energy of the emitted photon is given by:

where
h is the Planck constant
f is the photon frequency
Substituting

, we find

This is the energy given to the emitted photon; it means this is also equal to the energy lost by the electron in the transition, so the variation of energy of the electron will have a negative sign (because the electron is losing energy by decaying from an excited state, with higher energy, to the ground state, with lower energy)
We know the formula for density = Mass/ volume
So Mass, M = Volume * Density
Volume = 3.5 L= 0.0035
Density = 1.50 g/ml = 1500 
Mass, M = 0.0035*1500 = 5.25 kg
So mass of liquid having density 1.50 g/ml and volume 3.5 liters is 5.25 kg.