The basic idea that you need to understand is
W = \int^{1}_{2} P dv
P*V = n*R*T
Here n is the number of moles of the gas, R is the Boltzmann gas constant and T is the temperature. For an isothermal gas of fixed mass, n, R, and T are all constants. Therefore
P = (n*R*T) / V...