The Richter Scale calculates earthquake intensity on a logarithmic scale.
So, a magnitude 6 earthquake has 10 times the energy of a magnitude 5 earthquake.
The difference between 6.9 and 5.4 is 1.5 and so the difference in intensity is 10^1.5 or about 31.62.