**Solution:**

Given,

First term, a = 5

Last term, l = 45

Sum of the AP, S_{n} = 400

As we know, the sum of the AP formula is;

S_{n} = n /2 ( a + l )

400 = n /2(5 + 45)

400 = n /2(50)

Number of terms, n = 16

As we know, the last term of the AP can be written as;

l = a + (n − 1) d

45 = 5 + (16 − 1) d

40 = 15 d

Common difference, d = 40/15 = 8/3