$$\textbf{Step 1: Water in bucket at height x} $$
Mass of bucket full of water $$ = 15\ kg$$
Water goes out of bucket $$ = 6\ kg$$
Out flow of water per meter of pull $$ = \dfrac{6kg}{15m} $$
$$ = 0.4\ kg/m$$
Water in the bucket at height x from bottom $$(m)$$ $$ = (15 - 0.4 x) kg$$
$$m = (15 - 0.4x)$$
$$\textbf{Step 2: Work done} $$
Work done in pulling the bucket by small distance $$(dx)$$
$$dW = mg\ dx $$
$$dW = (15 - 0.4 x)g\ dx $$
$$\textbf{Step 3: Integration}$$
For total work done integrate from $$x = 0$$ to $$x = 15\ m$$
$$W = \int^{15}_{0} (15 - 0.4 x) g\ x $$
$$\Rightarrow W = g \left [15 x - 0.4 \dfrac{x^2}{2} \right ]^{15}_{0} $$
$$\Rightarrow W = 10 (225 - 45) \quad$$
$$\Rightarrow W = 1800\ J$$
Option C is correct.
$$\textbf{Alternate Solution:} $$
Here work done by gravity is linear function of height $$(x)$$
So we can find average water leak in this case-
Average weight leak $$ = 3$$ g Kg - wt
So remaining $$ = (15 - 3)\ g = 12$$ g Kg - wt
Work done $$ = F \times d $$ $$ = 12\ g \times 15$$ $$ = 120 \times 15$$
$$W = 1800\ J$$
$$\textbf{Note:} $$
This method is only applicable for the linear function of height.
If work done by gravity is a non-linear function of $$x$$ then, don't use this approach
e.g. If $$W = mgx^3$$
Here we can not apply this method