For ideal mechanical advantage in all simple machines: Win = Wout or Fidi = Fodo
Mechanical advantage = Fo/Fi It is the multiplier of the force you put in in order to exert a force out of the machine (usually mg - lifting a weight.
a) For ideal cases, F0/Fi = di/do i.e. because the work must be the same in and out for a simple machine, in order to have a mechanical advantage you have to exert the Fi for a longer distance. In the case of a ramp, di is the slope of the ramp and do is the height vertical height that the weight is lifted. I assume that by run you mean the vertical distance travelled going up the ramp, so the slope is (x2 + y2)1/2.
In b you are given the Fo so you need to divide by the Ideal Mech. Adv. you calculated in (a) in order to get Fi.