Friction formula problem?

I am having trouble getting this formula to work and I know it is easy! I am having a momentary lapse in math knowledge!
M1=571.4g M2=550g a=.155m/s(sqr) find the force of friction using a=(M1-M2-Mf)g/(M1+M2) or is it M1g-M2g-f=(M1+M2)a
I am having problem getting f by itself, any help?

I am having trouble getting this formula to work and I know it is easy! I am having a momentary lapse in math knowledge!
M1=571.4g M2=550g a=.155m/s(sqr) find the force of friction using a=(M1-M2-Mf)g/(M1+M2) or is it M1g-M2g-f=(M1+M2)a
I am having problem getting f by itself, any help?