$\dfrac{dy}{dx} = 5x^2 - x + 1$

$dy = (5x^2 - x + 1) \, dx$

$\displaystyle \int dy = \int (5x^2 - x + 1) \, dx$

$y = \frac{5}{3}x^3 - \frac{1}{2}x^2 + x + C$

At (3, 2)

$2 = \frac{5}{3}(3^3) - \frac{1}{2}(3^2) + 3 + C$

$C = -\frac{83}{2}$

Hence, the equation of the curve is

$y = \frac{5}{3}x^3 - \frac{1}{2}x^2 + x - \frac{83}{2}$ ← *answer*

You can also solve this problem by trial and error using the choices with (3, 2) on the curve to satisfy the equation.