It depends on how fast the water is entering Room B and how soon your character opens the door. Water pressure is a function of height as $h \rho g$, where $h$ is height of the water column, $\rho$ is density of water and $g$ is the acceleration due to gravity.
The force holding the door shut is the difference in pressure between the two sides times the cross sectional area of the door over which that is exerted, e.g., if the water level in Room A is $2m$ while in Room B it is $1m$, the pressure difference is $(2-1) \times 1000 \times 9.8 = 9800 Nm^{-2}$, exerted over $(2-1)m^2$ (assuming the door is $1m$ wide). The excess force exerted by the water column is therefore $9800Nm^{-2} \times 1 m^2=9800N \approx 1 Tonne$ of additional mass. The door therefore appears one tonne heavier.
On the other hand, if the water level in Room A is only $1 cm$ and only $1mm$ in Room B, the pressure difference is $0.01 \times 1000 \times 9.8 = 98Nm^{-2}$ and the force to overcome is only $98 \times (1 \times0.01)=0.98N$. I'm treating the marginal pressure of $1mm$ water as negligible.
The other variable here is the relative rate at which the rooms are filling up. If the rate at which Room A fills up is a lot higher than the rate at which water flows between Room A and B, then, assuming the door is sturdy enough it will be nearly impossible to open until the pressure stabilises. If the flow rates are of similar magnitude, then the pressure difference is negligible, and the door can be easily opened.
Assuming that the trivial cases are ignored, i.e., assuming the flow rate into A is significantly higher than flow rate into B and the character does not open the door early enough, then, assuming nothing else is holding the door shut, the best thing to do is to try and pry the door open. If a wide enough gap is opened, even for a second, the force of the water flowing in to try and equalise pressure will force the gap wider and hold it open. Think of it as current flowing through two conductors in parallel: the current flow through the wider conductor is proportionately higher than the flow through the narrower one. Your character needs to crawl along the edge, where the speed of entering water is lowest, and he'll be out.
EDIT:had another idea while reading Youstay Igo's answer. Copying the comment I made, here:
Poking a hole while the door is exposed has 2 advantages: 1) he can exert more force in air than in water; 2) the high pressure difference between the 2 sides of the door would force water though at high speed. If he is clever, he can make holes in a straight line along the middle of the door and the water coming through will tear the door apart like a page of stamps.