Given,
First term (a) = 5 and the last term (l) = 45
Also, Sn = 400
We know that,
an = a + (n – 1)d
⟹ 45 = 5 + (n – 1)d
⟹ 40 = nd – d
⟹ nd – d = 40 ….. (1)
Next,
Sn = \(\frac{n}{2}\)(2(5) + (n − 1)d)
⟹ 400 = n[10 + nd – d]
⟹ 800 = n[10 + 40] [using (1)]
⟹ 800 = 50n
⟹ n = 16 …. (2)
So, by substituting (2) in (1), we have
nd – d = 40
⟹ 16d – d = 40
⟹ 15d = 40
⟹ d = \(\frac{8}{3}\)
Therefore, the common difference of the given A.P. is \(\frac{8}{3}\).