Use mathematical induction to shoe that fpr any $n\in N$, if $n\ge2$, then $$\prod_{i=2}^{n}\left(1-\frac{1}{i^2}\right)=\frac{n+1}{2n}$$

So I understand what's happening up until the first red circle. Why does 1 - become $(n+1)^2$?
When expanding $(n+1)^2$ I thought it'd be $n^2+2$, why is there an extra $n+1$?
$$\color{blue}{1}-\frac{1}{(n+1)^2}=\color{blue}{\frac{(n+1)^2}{(n+1)^2}}-\frac{1}{(n+1)^2}=\frac{(n+1)^2-1}{(n+1)^2}$$
Now use $$(a+b)^2=(a+b)(a+b)=a^2+ab+ab+b^2=a^2+2ab+b^2$$
to get $(n+1)^2=n^2+2n+1$