Mindbending arithmetic problem This is the question which I am referring to

If the sum of $ m $ terms of an AP is equal to the sum of the next $ n $ terms of an AP as well as the sum of next $p $ terms then prove that

$$(m+n)\left[\frac {1}{m}- \frac {1}{p}\right]= (m+p)\left[\frac {1}{m}- \frac {1}{n}\right] $$
What I have tried is I equated
$$S_m=S_n = s_p$$
Then I know that next term of AP after $m$ terms is the first term of next n terms and using similar analogy for first term of $p$ terms I got the following expression.
$$\frac { m}{2}[2a+(m-1) d]= \frac { n}{2}[2(a+md)+(n-1) d]= \frac { p}{2}[2(a+(m+n) d)+(p-1) d] $$
After this I was not able to figure out how to move towards solution.
So it would be a help to guide me towards the proof.
 A: Hint:
This looks rather peculiar as you in effect start with two equations in five unknowns and want to reduce them to one equation in three unknowns.  
In fact your equations are all linear combinations of $a$ and $d$, so (assuming $d\not =0$, as otherwise $a=0$ or $m=n=p$ , neither of which are helpful) dividing through by $d$ you can solve $$\frac { m}{2}\left[2\frac{a}{d}+(m-1) \right]= \frac { n}{2}\left[2\left(\frac{a}{d}+m\right)+(n-1)\right] $$ for $\dfrac{a}{d}$ and then substitute that into $$\frac { m}{2}\left[2\frac{a}{d}+(m-1) \right]= \frac { p}{2}\left[2\left(\frac{a}{d}+(m+n) \right)+(p-1) \right] $$ and manipulate to give the desired expression. 
A: Let the arithmetic progression in question be $\{a_n\}$. Then, we are given that $$a_1 + a_2 + \cdots + a_m = a_{m + 1} + a_{m + 2} + \cdots + a_{m + n} = a_{m + n + 1} + a_{m + n + 2} + \cdots + a_{m + n + p}.$$ By definition, we have $a_k = k d + a_0$, where $d$ is the difference between two terms. Then we have by the above equation that $$m a_0 + \frac {1} {2} m (m + 1) d = na_0 + m n d + \frac {1} {2} n (n + 1) d = p a_0 + (m + n) n d + \frac {1} {2} p (p + 1) d,$$ which by subtraction (of the second from the first and the third from the second, simultaneously) gives the desired result.
