I came across a problem regarding maxima and minimas of a function which is as follows :

then g(x) has
a)local maxima at x = 1 + ln 2 and local minima at x = e
b)local maxima at x = 1 and local minima at x = 2
c)no local maxima
d)no local minima
My attempt :
I thought that I should draw the graph of the derivative of f(x) and as integral is the algebraic sum of the area I would get the minima and maxima.
So the graph plotted is as follows :

At x= 1 + ln 2, as the graph is becoming negative so the integral would start decreasing hence it is a maxima and for x=e the integral starts increasing as now the algebraic area is positive and hence it is minima. So, I got option A right but in the solution , even option B is correct but I don’t get how? Is it something to do with continuity or the change in function? I am not able to understand it.
Any help would be greatly appreciated!
Your answer is correct. Here is a sketch of $g(x)$: