See attached file.
Let's first compute how much work the force performs on the object as it moves from x = 0 meters to x = 3 meters. This is given by the integral of F dx. From x = 0 meters to 2 meters F is positive and the contribution to the integral is the area enclosed by the x-axis, the y-axis and the graph of the force which is 8 J.
From x = 2 meters to 3 meters the contribution to the integral is minus the area anclosed by the graph, the segment on the x-axis from x = 2 meters to x = 3 meters and the line parallel to the y axis given by x = 3 meters. This contribution is thus minus 2 J.
So, the total gain in kinetic energy equals 8 J - 2 J = 6 J. The kinetic energy at x = 0 meters was
1/2 * 1.5 kg (4.0 m/s)^2 = 12 J
So, it follows that the kinetic energy at x = 3 meters is 12 J + 6 J = 18 J which is answer a)
A detailed solution is given.