It's a problem on mathematical induction.
$$1^2-2^2+3^2-.....+(-1)^{n-1}n^2=(-1)^{n-1}\frac{n.(n+1)}{2}$$
I have proved it for values of $n=1,2$.
Now I assume for $n=k$
$$P(k):1^2-2^2+3^2-.....+(-1)^{k-1}k^2=(-1)^{k-1}\frac{k.(k+1)}{2}$$.
$$P(k+1):1^2-2^2+3^2-.....+(-1)^{k-1}k^2+(k+1)^2=(-1)^{k-1}\frac{k.(k+1)}{2}+(k+1)^2\\=\frac{(k+1)}{2} [(-1)^{k-1}.k+2k+2]$$
I need suggestion to deal with the $(-1)^{k-1}$ so that I can prove the whole. Any help is appreciated.
You are making a mistake, in that you are assuming that $(-1)^k=1$.
You have \begin{align} (-1)^{k-1}\frac{k.(k+1)}{2}+(-1)^k(k+1)^2&=(-1)^{k-1}\frac{(k+1)}{2} [k-(2k+2)]\\ \ \\ &=(-1)^{k-1}\frac{(k+1)}{2} [-(k+2)]\\ \ \\ &=(-1)^{k}\frac{(k+1)(k+2)}{2} \\ \ \\ \end{align}