Hey manishamishra.

In the first question you are adding up n^2 terms and in the second one you are adding up (2n)^2 terms in a summation.

You can factorize out the (2n)^2 to give 4n^2 which means you have 4 * Summation of n^2 and since you have the summation for n^2 you can get the summation for (2n)^2.