Answer
$T_A\gt T_B$
Work Step by Step
After the addition of heat, the temperature in container A will be greater than the temperature in container B. This is because container A received all the added heat energy as an increase in internal energy, while container B had to use some of the added heat energy to do work.
In container A, 10 J of heat is added at constant volume, so all the heat energy is used to increase the internal energy of the gas molecules, leading to an increase in its temperature. This is because the heat energy increases the kinetic energy of the gas molecules, causing them to move faster and collide more frequently, leading to an increase in the temperature.
In container B, 10 J of heat is added at constant pressure, so some of the heat energy is used to do work on the gas to increase its volume, and the rest is used to increase the internal energy of the gas molecules. This means that the increase in temperature in container B will be less than the increase in temperature in container A because some of the added heat energy in container B is used to do work instead of increasing the internal energy of the gas molecules.
Let's prove that mathematically.
$$Q= \color{red}{\bf\not} n_AC_{\rm v}\Delta T_A= \color{red}{\bf\not} n_BC_{\rm p}\Delta T_B $$
The two containers initially are having the same mass of gas, so $n_A=n_B$
$$C_{\rm v}(T_A-T_1)= C_{\rm p}(T_B-T_1) $$
$T_1$ is the initial temperature of both gases.
$$\dfrac{C_{\rm p}}{C_{\rm v}}=\dfrac{(T_A-T_1)}{(T_B-T_1)}$$
Recall that ${C_{\rm p}}\gt {C_{\rm v}}$, so ${C_{\rm p}}/{C_{\rm v}}\gt 1$
Thus,
$$ \dfrac{(T_A-T_1)}{(T_B-T_1)}\gt 1$$
$$T_A-T_1\gt T_B-T_1 $$
Therefore,
$$\boxed{T_A\gt T_B}$$