Answer
$1661\;\rm J$
Work Step by Step
We know that the work done on the gas is given by
$$W=-\int_i^fPdV$$
And since we assume that this is an ideal gas, then the pressure is given by $PV=nRT$
$$W=-\int_i^f\dfrac{nRT}{V}dV$$
The temperature is constant since it is an isothermal process.
$$W=-nRT\int_{V_i}^{V_f}\dfrac{dV}{V}=-nRT\ln V\bigg|_{V_i}^{V_f}$$
$$W=-nRT\ln\left(\dfrac{V_f}{V_i}\right)\tag 1$$
We know that the work done on the gas is 500 J to compress the gas to its half initial volume.
Hence,
$$W=-nRT\ln\left(\dfrac{\frac{1}{2} \color{red}{\bf\not} V_i}{ \color{red}{\bf\not} V_i}\right) $$
Thus,
$$nRT=\dfrac{-W}{\ln\left(\frac{1}{2}\right)}$$
$$nRT =\dfrac{-500}{\ln\left(\frac{1}{2}\right)}\tag 2$$
Now we need to find the work down when $V_f=\frac{1}{10}V_i$
$$W=-nRT\ln\left(\dfrac{\frac{1}{10} \color{red}{\bf\not} V_i}{ \color{red}{\bf\not} V_i}\right) $$
Plugging from (2)
$$W=-\left(\dfrac{-500}{\ln\left(\frac{1}{2}\right)}\right)\ln\left( \frac{1}{10} \right) $$
$$W=\color{red}{\bf 1661}\;\rm J$$