There's actually not one simple answer to your question, which is why you are a bit confused. To specify your problem fully, you must specify exactly how and whether the gas swaps heat with its surroundings and how or even whether it is compressed. You should always refer to the full gas law $P\,V=n\,R\,T$ when reasoning. Common situations that are considered are:
Charles's Law: The pressure on the volume gas is constant. No work is done by the gas on its surroundings, nor does the gas do any work on its surroundings or piston or whatever during any change. The gas's temperature is that of its surroundings. If the ambient temperature rises / falls, heat is transferred into / out from the gas and its volume accordingly increases / shrinks so that the gas's pressure can stay constant: $V = n\,R\,T/P$; with $P$ constant, you can retrieve Charles's Law;
Isothermal: the gas is compressed / expanded by doing work on / allowing its container to do work on its surroundings. You think of it inside a cylinder with a piston. As it does so, heat leaves / comes into the gas to keep the temperature constant. As the gas is compressed, the work done on it shows up as increased internal energy, which must be transferred to the surroundings to keep the temperature constant. At constant temperature, the gas law becomes $P\propto V^{-1}$;
Adiabatic: No heat is transferred between the gas and its surroundings as it is compressed / does work. AGain, you think of the gas in a cylinder with a plunger. This is prototypical situation Feynman talks about. As you push on the piston and change the volume $V\mapsto V-{\rm d}V$, you do work $-P\,{\rm d}V$. This energy stays with the gas, so it must show up as increased internal energy, so the temperature must rise. Get a bicycle tyre pump, hold your finger over the outlet and squeeze it hard and fast with your other hand: you'll find you can warm the air up inside it quite considerably (put you lips gently on the cylinder wall to sense the rising temperature). This situation is described by $P\,{\rm d}V = -n\,\tilde{R}\,{\rm d} T$. The internal energy is proportional to the temperature and the number of gas molecules, and it is negative if the volume increases (in which case the gas does work on its surroundings). But the constant $\tilde{R}$ is not the same as $R$: it depends on the internal degrees of freedom. For instance, diatomic molecules can store vibrational as well as kinetic energy as their bond length oscillates (you can think of them as being held together by elastic, energy storing springs). So, when we use the gas law to eliminate $P = n\,R\,T/V$ from the equation $P\,{\rm d}V = -n\,\tilde{R}\,{\rm d} T$ we get the differential equation:
$$\frac{{\rm d} V}{V} = - \frac{\tilde{R}}{R}\frac{{\rm d} T}{T}$$
which integrates to yield $(\gamma-1)\,\log V = -\log T + \text{const}$ or $T\,V^{\gamma-1} = \text{const}$, where $\gamma=\frac{R}{\tilde{R}}+1$ is called the adiabatic index and is the ratio of the gas's specific heat at constant pressure to the specific heat at constant volume.
Charle's Law:
$\frac{V}{T}=k$
The idea is that, given an ideal gas, as the temperature rises the system instantly responds by balancing the potential increase in pressure with an actual increase in volume.
In the case of the piston, you can easily measure the work done by measuring how much the piston moved. But in a general case:
$dW = Fdx$
$Fdx$ or force times movement interval could be written as pressure (force over area) times interval of area times area interval times movement interval or $dW = pdAdx$. You can represent that better with $dW = pdV$ or volume interval.
So for a general case, with constant pressure, the work done by the gas is $W = p(V_f - V_i)$.
Nevertheless, depending on what they ask, you might need to use:
$pV = nRT$
In that case, you need to solve the integral:
$W = nRT\int_{V_i}^{V_f} \frac{dV}{V}$
Which solves to:
$W=nRT(\ln{V_f} - \ln{V_i})$
Or
$W=nRT \ln{\frac{V_f}{V_i}}$
Best Answer
Before you apply any law, the first thing to consider is the conditions, assumptions and special cases (if any).
Charles's Law requires constant pressure. If the pressure is not constant, then you can't use this law. Does it apply here?
For Gay-Lussac's law, you need fixed mass and fixed volume. Does it apply here?
Pressure, volume, temperature, and mass all affect each other. You need two of them to be fixed in order to get direct proportionality between the remaining two.