A light spring having a force constat of 125 N/m is used to pull a 9.50kg sled on a horizontal frixtionless ice rink. If the sled has an acceleration of 2.00 m/s^2, by how much does the spring stretch if it pulls on the sled (a) horizontally, (b) at 30.0 degrees above the horizontal

For b i don't understand how to get the answer they got and that is 17.6 cm
If at 30 deg above.
x= ma/k (1/cos30)

But then theres a second part to the question asking what would the answers in both cases be if there were friction and the coefficient of knetic friction between the sled and the ice were .200?

(b) The spring must supply a force F uch tham
F - Mg sin 30 = M a

The term on the left is the net force up the incline, and has the component of weight subtracted. Solve for F , then use the same spring formula for the deflection.

M g sin 30 = 46.55 N
F = 46.55 + 19 = 65.55 N
deflection = 65.55/125 = 0.524 m

With friction, subtract the friction force, which you can calculate, from the applied force; then apply
Fnet = M a

the answer for b is suppose to be in cm and they got 17.6cm

and for the second part of the question about adding force would it be the 125N - .200 ??