They are both right.
Work Step by Step
Looking at these two equations, it seems like they contradict each other, but this is actually a misunderstanding of when each is used. The ideal gas law is used when T can be changing. However, for the other equation, T on the other side of the equation is constant, so the value on the right side has to be constant.