Find the number of values of k? Find the number of values of k  for which the expression 
$$y=  (x^2 -  x(k-2) + k^2)(x^2 +  kx + (2k-1))$$
is a perfect square .
I tried by assuming the product as $$ t^2 $$
And then assuming two separate equations as  t
Is this the right approach.
How i can achieve this? Thanks in advance.

Another approach is to multiply out the expression to get
$$x^4+2x^3+(4k-1)x^2+(k^3-2k^2+5k-2)x+k^2(2k-1)\;.$$
If this is a perfect square, it will have the form
$$(x^2+ax+b)^2=x^4+2ax^3+(a^2+2b)x^2+2abx+b^2$$
for some $a$ and $b$. Equating coefficients, we see that $a=1$ and
$$\left\{\begin{align*}
2b+1&=4k-1\\
2b&=k^3-2k^2+5k-2\\
b^2&=k^2(2k-1)\;.
\end{align*}\right.$$
The first two of these equations are easy to solve, and the results can then be tested against the third equation.
