Firstly, you can pull any constants out the front of the integral. So the integral we are left with is
Integrate both sides of the equation and rearrange it like this
The left hand side is the integral we want to solve for
So we have equated our integral to the left hand side and we are now going to work backwards to solve for the right hand side.
We need to find all the information needed for the right hand side of the equation.
We already know from the left hand side that
Also, according to the left hand side we already have g' so
Integrate this to find g
Now we have everything we need for the right hand side
So, now we have done all the work, we just need to add a constant of integration in and we finally have