Escape. In school we usually start with the various gas laws PV=k, P/T = k, P=nk, etc. and come to the Ideal Gas Law PV=nRT. Why? because it is so useful and general.
Its often good for REAL gasses to within a couple of percent (at STP or higher temps and/or lower pressures) and even the worst cases are generally only "off" by 5 or 10% (away from the material's critical points). But it assumes (if you derive it from "fundamental" principles (ie statistical mechanics)) that the gas is composed of point particles which do not interact. Well, how many Angels can dance on the head of a pin? I mean, how many moles, n, of a gas composed of infinitely small point-particles can you add to a tank? Yeah, as many as you want. And according to a beginner's application of the IGL, what you'll change is P (although it doesn't forbid a change in T or in both P & T). But changing T is trickier. There is NOTHING in the IGL which tells you anything about what happens to the other variables when you change one of the FOUR variables. If the problem is expressed carefully, the variables which are independent are declared and the variables which are held constant are also mentioned. In your cases, in tank A, by assumption n and V are held constant and T is increased by 300°. In your tank B, by assumption, n is held constant but now you have two dependent variables T and P and one independent variable, V. It takes more assumptions to conclude that T doesn't drop to 150°K! (which would keep P constant as V is halved). Right? In thermodynamics, which this question is about (mostly), one of the first things you learn about is systems. Open, closed and Isolated are the three most often taught at the elementary level. So in tank A, you add heat and nothing else and then allow heat to escape and then ask what the difference will be. In tank B, you change the volume of the system, allow heat to escape (T to return to 300°) and ask what the difference will be. Its an easy IGL question. for nRT to be constant, then if you have halved V you must double P otherwise PV will not equal P'V'. If you think about it in more pragmatic terms, stepping on a 12 inch piston so that it compresses to 6 inches will NOT! heat the contents by 300°. The actual energy used depends on how the molecules (or atoms if its full of He or something similar)
will heat up as they are crowded...NOT something point-like particles need be concerned with.) (In other words, the fact that a gas changes T as it expands or is compressed is PROOF that atoms (molecules, actually) are not point-like and/or do interact.) Elementary thermodynamics deals with situations where gravity, the weak force, strong force, and even most electromagnetic radiation can be (and is) ignored. (Just picture a tank 1000km high, think pressure will be uniform?? (and how about Temperature? Will T EVER become uniform?(hint: velocity is a measure of kinetic energy = molecular heat, and escape velocity is the velocity at which gravity is "overcome"...). Further information on how T of a gas increases with energy (work, heat) can be found under Heat Capacity in Wikipedia, but reading through it requires a bit of
partial differentiation (of simple multivariate equations, f(x,y,z)) which may be something you've not learned yet...(check out the section on diatomic gasses).