How did you get 1??
If f(x)=a(x^2-1)+1, then plug in x=1 and x=-1, both should give you 1, contradictory to what's given in the problem f(1)=3!!
Since you are given two initial conditions, and you have f(x)=m(x+1)+1=n(x-1)+3, you should be able to uniquely solve this equation set and get...