For (2), you know the force on Mars by the sun is given by
where the second equality is using the fact that mars is experiencing centripetal acceleration around the sun. From there you can use the fact that
where T is the period and R is the radius of Mars' orbit.
Plugging that expression for v into the top equation gives you an equation where you know everything except M, the mass of the sun.