f'(x)=3x^2+6mx+n
f'(-1)=3-6m+n=0
f(-1)=-1+3m-n+m^2=0
m^2+3m-(6m-3)-1=0
m^2-3m+2=0
(m-1)(m-2)=0
m=1,n=6-3=3
m=2,n=12-3=9