It is known that the general term (T)r+1 {which is the (r+1) in the
binomial expansion of (a+b)n is given by Tr+1=nCran−rbr
Thus, the general term in the expansion of (x2−y)6 is
Tr+1=6Cr(x2)6−r(−y)r=(−1)r6Crx12−2ryr