Since the body starts from rest and comes to rest at the maximum height the change in kinetic energy of the system is zero and so by work energy theorem total work done is zero
$\int \limits_0^H (\hat F+m \vec g) dh=0$ [Where H is maximum height attained]
$\int \limits_0^H [-2mg(1-ah)+mg]dh=0$
$\int \limits_0^H mg(1-2h)dh=0$
$mg H (1-aH)=0$
$H= \large\frac{1}{a}$
Maximum height attained $=\large\frac{1}{a}$
Hence b is the correct answer.