The key in this problem is really an algebraic "trick" or manipulation to coax out the right-hand side from the left. You've presumably verified the base case (for $n=2$). You then assumed that $\color{blue}{\sum_{i=1}^k\frac{1}{i^2}=2-\frac{1}{k}}$ for some fixed $k\geq 2$. Now, your goal is to use this assumption (called the inductive hypothesis) to prove that $$\color{green}{\sum_{i=1}^{k+1}\frac{1}{i^2}=2-\frac{1}{k+1}}.$$
Starting with the left-hand side,
\begin{align}
\color{green}{\sum_{i=1}^{k+1}\frac{1}{i^2}} &= \color{blue}{\sum_{i=1}^k\frac{1}{i^2}}+\frac{1}{(k+1)^2}\tag{by defn. of $\Sigma$}\\[1em]
&< \color{blue}{\left(2-\frac{1}{k}\right)}+\frac{1}{(k+1)^2}\tag{by inductive hypothesis}\\[1em]
&= 2-\frac{1}{k+1}\left(\frac{k+1}{k}-\frac{1}{k+1}\right)\tag{manipulate}\\[1em]
&= 2-\frac{1}{k+1}\left(\frac{k^2+k+1}{k(k+1)}\right)\tag{simplify}\\[1em]
&< \color{green}{2-\frac{1}{k+1}}.\tag{$\dagger$}
\end{align}
we end up at the right-hand side, completing the inductive proof.
$(\dagger)$: How did I get from the "simplify" step to the $(\dagger)$ step? Well, the numerator is $k^2+k+1$ and the denominator is $k^2+k$. We note that, $k^2+k+1>k^2+k$ (this boils down to accepting that $1>0$). Since $\frac{1}{k+1}$ is being multiplied by something greater than $1$, this means that what is being subtracted from $2$ in the "simplify" step is larger than what is being subtracting from $2$ in the $(\dagger)$ step. Does that make sense? The main "trick" in the proof above is in the "manipulate" step, where you make a subtle connection with what the right-hand side of what you are trying to prove. Hope that helps.