What past paper is it for? (Year, School)
From what I see, this must be referring to 2 separate questions (Because there is no line with that derivative that satisfies both conditions you put up)
As such, what you do is you integrate 18x + 4. This then gives you some primitive function with a +c at the end of it. Then, you sub in the values of x and f(x) into the equation, and solve it for c (So if the equation was 3x+c=y, sub in a value for x and y and then solve for c). Do this for both points to find your answers (Since there have to be 2).
You would integrate the 18x+4 equation to get dy/dx=9x^2+4x+c, and sub in x=-1, dy/dx=0 to find the value of c. You now have your dy/dx equation and just do the same thing but with values x=1, y=10 to find the equation of the curve.