This can be done by expanding (x^2+2+1/x^2)^5 you will get the cofficient of some terms and just find the corresponding coefficients from the second term ie (1+x^2)^40 you will get the corresponding terms for each term you get from expanding (x^2+2+1/x^2)^5 for eg : corresponding term for 1/x^10 will be x^30 and for x^10 will be x^10 except of the term containing 1/x^5 just multiply the corresponding coefficients and evaluate the result by adding them all the result would be :