f(1)=−10, f(−1)=6
f′(1)=0 and f′′(−1)=0 as given
f(x) has minima at x=1
and f′(x) has minima at x=−1
So, f′′(x)=a(x+1)
Integrating both sides
f′(x)=a2(x+1)2+c
f′(1)=0=2a+c
⇒c=−2a
f′(x)=a2(x+1)2−2a
Intergrating both side
f(x)=a6(x+1)3−2xa+c′
f(1)=−10=8a6−2a+c′
f(−1)=6=2a+c′
2a+c′=6
4a−6c′=60
⇒a=6,c′=−6
f(x)=(x+1)3−12x−6
f(3)=(4)3−36−6
f(3)=22