I have some doubts regarding the Van der Waals' equation which relates the Pressure, volume and temperature of real gases.
It is given by : $$(P_{real}+\frac{an^2}{V^2})(V-nb) = nRT$$
I also read that
$$P_{ideal}=P_{real}+\frac{an^2}{V^2}$$
I know that the term $(V-nb)$ represents the volume remaining for a real gas. So in my opinion, the Pressure term in the above equation should also be the Pressure of the real gas on the walls.
But the second mentioned equation doesn't indicate this and clearly contradicts my intuition.
So my question is What is the term $P$ in the Van der Walls' equation ?
If it is the pressure of the ideal gas then why should we include Pressure of ideal gas in the equation for real gases ? Shouldn't the equation be $$(P-\frac{an^2}{V^2})(V-nb)=nRT\;?$$
Also if this is the pressure in the middle of a real gas then why should we include this pressure to indicate the pressure at the walls ?
If someone has doubt with the last paragraph of this question, please see the comments to the Garf's answer.