According to binomial theorem expansion of #(a+b)^n#
= #C_0^na^n+C_1^na^(n-1)b+C_2^na^(n-2)b^2+....+C_r^na^(n-r)b^r+....+C_(n-1)^nab^(n-1)+C_n^nb^n#
where #C_r^n=(n!)/(r!(n-r)!)=(n(n-1)(n-2)....(n-r+1))/(1*2*3*.......*r)#, where #C_0^n=1#
Also observe that #C_(n-r)^n=C_r^n#
Hence #(3x+y^2)^7#
= #C_0^7(3x)^7+C_1^7(3x)^6(y^2)+C_2^7(3x)^5(y^2)^2+C_3^7(3x)^4(y^2)^3+C_4^7(3x)^3(y^2)^4+C_5^7(3x)^2(y^2)^5+C_6^7(3x)(y^2)^6+C_7^7(y^2)^7#
= #2187x^7+5103x^6y^2+5103x^5y^4+2835x^4y^6+945x^3y^8+189x^2y^10+21xy^12+y^14#
Observe that #C_0^7=1#, #C_1^7=7#, #C_2^7=21#, #C_3^7=35#, #C_4^7=35#, #C_5^7=21#, #C_6^7=7# and #C_7^7=1# and that these vaues can also beobtained using Pascal's triangle.