m1^2=m1+9
m1^3=m1^2+9m1=m1+9+9m1=10m1+9
m2^2=m2+9
m1+m2=1
m1^3+7m2^2+3m2-66
=10m1+9+7(m2+9)+3m2-66
=10(m1+m2)+6
=16