To solve the finite continued fraction $[2,....,2]$, can I use this solution.
Let $y$ be the value of $[2,....,2]$. Then $y=[2;y]=2+\frac{1}{y}$.
So $y-2=\frac{1}{y}$. Thus $y^2-2y-1=0$
My question is is my method correct. Is this approach suitable to solve $[2,....,2]$
No, this is only valid for the infinite continued fraction.
If the continued fraction has a finite length (say, length $5$), then
$$y = 2 + \frac1{2 + \frac1{2 + \frac1{2 + \frac12}}} \ne 2 + \frac1y = 2 + \frac1{2 + \frac1{2 + \frac1{2 + \frac1{2 + \frac12}}}}.$$
The same thing happens for any length.
Instead, you can just compute the fraction for $y$ recursively: You have $[2] = 2$, $[2;2] = 2+\frac12 = \frac32$, $[2;2,2] = 2 + \frac1{3/2} = \frac53$, and in general, if you got $y_n$ for $n$ $2$'s, then you get $y_{n+1} = 2 + \frac1{y_n}$.