![enter image description here](https://i.stack.imgur.com/q1391.png)

$Y\_1,Y\_2,\ldots,Y\_n$ are independent random variables, each with probability function
$$
P(y)=\binom{y-1}2 p^3(1-p)^{y-3},\quad (y=3,4,5,\ldots).
$$
Find the MLE of $p$.

I tried rearranging the result in fourth line many times but I still couldn't get the answer in the fifth line. Can someone please tell me how to derive the fifth line in the solution?