Where this goes wrong
P₁V₁ / T₁ = P₂V₂ / T₂
4.0 L · 2.0 atm, 27 °C → 1.0 atm, 127 °C · correct V₂ = 10.7 L
Leaving temperature in Celsius. Using 127/27 instead of 400.15/300.15 gives 4.0 × (2.0/1.0) × (127/27) = 37.6 L. A Celsius ratio exaggerates the change wildly. Convert first: K = °C + 273.15.
Inverting the pressure ratio. Pressure fell from 2.0 to 1.0 atm, so the gas expands. Writing (1.0/2.0) gives 2.67 L, a shrinking gas. The old pressure goes on top: (P₁/P₂).
Inverting the temperature ratio. Heating from 300.15 to 400.15 K expands the gas. Writing (300.15/400.15) gives 6.00 L. The new temperature goes on top: (T₂/T₁).
Holding a variable that actually changed. Treating temperature as constant uses pressure alone: 4.0 × (2.0/1.0) = 8.0 L. Both P and T changed here, so both ratios belong in the setup.