d2y/dx2 = 6x-2 ==> dy/dx=3x^2 - 2x + c (where c is a
constant)
you know from the qn that the tangent to the curve at
(1,4) is y = 2x + 2, so it means that dy/dx at x=1 has a gradient
of 2, so... 3(1)^2 - 2(1) + c = 2 ==> c = 1
therefore dy/dx = 3x^2 - 2x + 1
then you integrate again to find that it has another constant d,
but it also contains the point (1,4). i think you can continue on
yourself =)