It depends in the situation. If the volume is constant, ΔV = 0 so w = 0. If the pressure is constant, w = -P(ext)ΔV. If you have an isothermal reversible expansion (both pressure and volume change by infinitely small amount), w = -nRTln(V2/V1). I hope that helps?

Generally it is based off the information given within the problem. For instance if the temperature and amount of moles or mass of substance is given with aa changing volume, it is probably best to use the 2nd equation. If you are given a constant value of pressure then it would be safe to use the first equation. But I have a feeling that we will be using the 2nd one more often in this chapter.

But these type of questions involving work of expansion for a gas typically apply to simple systems (not reactions).The only reaction they can apply to are gas phase reactions that result in different moles of gas (reactant) and gas (product).