This is a help site, not an answer site. I am not even sure I guessed correctly what the problem is. It seems plausible that the maximum distance of 120 is correct, but you neither gave that information nor confirmed what was a guess. Furthermore, it is not clear to me that the problem permits you to place the origin at point A though that makes the equation of the line very simple and certainly simplifies solving for the coefficients of the cubic.

This problem consists of several sub-problems. The first is finding the coeffients of a cubic. It won't help you on a test if you are reliant on me or a cubic calculator to find such coefficients.

If we are allowed to choose point A as the origin, then we have the equation

\(\displaystyle f(0) = a(0^3) + b(0^2) + c(0) + d = 0 \implies 0 + 0 + 0 + d =0 \implies\)

\(\displaystyle d = 0 \implies f(x) = ax^3 + bx^2 + cx = x(ax^2 + bx + c).\)

Now quite clearly your cubic has d = 120, which certainly follows from making f(0) the maximum, but makes for a very different kind of cubic. Consequently, if you are required to place the maximum at the origin, you need to revise all the equations I provided. If however you are free to use A as the origin, you may find the arithmetic easier and will definitely find that the equation of the line is much easier to work with.

Assuming that you are allowed to set A as the origin and that you see why d = 0, you can find the remaining coefficients by solving the following system of three linear equation in three unknowns

\(\displaystyle 0 = 3a(30^2) + 2b(30) + c\)

\(\displaystyle 120 = 30\{a(30^2) + b(30) + c\} \implies 4 = 900a + 30b + c\)

\(\displaystyle 0 = 90\{ a(90^2) + b(90) + c\} \implies 0 = 8100a + 90b + c\)