Note this is an arithmetic series problem, so we use the equation: xn = a + d(n-1).
Number of steps on the first floor is 'a', i.e. a = 150.
Difference in the number of steps on each subsequent floor is -5 because there are '5 fewer than the previous', i.e. d = -5.
We are given that the number of steps leading to the final floor is 30, hence xn = 30.
Our unknown 'n' denotes the number of floors. So rearranging the arithmetic series equation for n gives:
n = (xn - a)/d + 1.
Hence n = (30-150)/(-5) + 1 = 25. The number of floors in our temple is 25.