Answer
$2.83\;\rm atm$
Work Step by Step
To find the final pressure of the gas, we need to find its final temperature. And to find its final temperature, we need to find the final temperature of the system.
Since the containers themselves are nearly massless and do not affect the outcome, the system [water+gas] is an isolated system.
Thus,
$$Q_{water}+Q_{gas}=0\tag 1$$
$\bullet$ For the gas,
$$Q_{gas}=n_{ }c_{\rm v}\Delta T_{gas}$$
We know that the two materials will have the same final temperature.
$$Q_{gas}=n_{ }c_{\rm v}[T_f-T_{i,gas}]\tag 2$$
$\bullet$ For the water;
$$Q_{water}=mc\Delta T_{water}$$
$$Q_{water}=mc[T_f-T_{i,water}]\tag 3$$
Plug (2) and (3) into (1);
$$mc[T_f-T_{i,water}]+n_{ }c_{\rm v}[T_f-T_{i,gas}]=0$$
Solving for $T_f$;
$$mc T_f-mcT_{i,water} +n_{ }c_{\rm v} T_f-n_{ }c_{\rm v}T_{i,gas} =0$$
$$T_f[mc +n_{ }c_{\rm v} ]=n_{ }c_{\rm v}T_{i,gas}+mcT_{i,water} $$
$$T_f=\dfrac{n_{ }c_{\rm v}T_{i,gas}+mcT_{i,water}}{mc +n_{ }c_{\rm v} }\tag 4$$
Now we need to find the initial temperature of the gas which we assume it is an ideal gas.
$$P_iV_i=nRT_{i,gas}$$
Hence,
$$T_{i,gas}=\dfrac{P_iV_i}{nR}\tag 5$$
Plugging into (4);
$$T_f=\dfrac{ \left(\frac{c_{\rm v}P_iV_i}{ R} \right)+mcT_{i,water}}{mc +n_{gas}c_{\rm v} }\tag 6$$
Now we need to find the final pressure of the gas which is given by
$$\dfrac{P_i \color{red}{\bf\not} V_i}{T_{i,gas}}=\dfrac{P_f \color{red}{\bf\not} V_f}{T_f}$$
The gas volume is constant, so
$$P_f=\dfrac{P_i T_f}{ T_{i,gas}}$$
Plugging from (5);
$$P_f=\dfrac{nR \color{red}{\bf\not} P_i T_f}{ \color{red}{\bf\not} P_iV_i}$$
Plugging from (6);
$$P_f=\dfrac{nR }{ V_i}\left[\dfrac{ \frac{c_{\rm v} P_iV_i}{ R} +mcT_{i,water}}{mc +n_{ }c_{\rm v} }\right]$$
Plugging the known;
$$P_f=\dfrac{(0.4)(8.31)}{ (4000\times 10^{-6})}\left[\dfrac{ \frac{(12.5) (10\times 1.013\times 10^5) (4000\times 10^{-6})}{ 8.31} +(0.02)(4190)(20+273)}{(0.02)(4190)+(0.4)(12.5) }\right]$$
$$P_f=\bf 2.9\times 10^5\;\rm Pa\approx \color{red}{\bf 2.83}\;atm$$