Since there are p arithmetic means between a b

= there are total (p + 2) terms in the A.P. (As p arithmetic means + two terms (a b) = p + 2 terms in total)

Thus A.P. will be like a, k_{1 }, k_{2 }, k_{3} ...............,k_{p} , b

Where k_{1} = First arithmetic mean

k_{2} = second arithmetic mean ...........

k_{p }= p^{th} arithmetic mean

Now using the formula

n^{th} term of an A.P. = a + (n - 1) d .......(1)

Where a = first term of A.P.

n = total number of terms in the A.P.

And d = common difference of A.P.

Here a = a, n = (p + 2) , (p + 2)^{th} term = b and d = d (let)

Putting values in (1) we get

b = a + [(p + 2 - 1) d]

= b = a + (p - 1) d = b - a = (p - 1) d = (b - a)/(p - 1) = d (Rearranging)

= d = (b - a)/(p - 1)