We know that ideal gas equation is $PV= nRT$ where P is the pressure of the ideal gas and V is the volume of the ideal gas. Thus, we can write :
$$ P_{\textrm{ideal}}V_{\textrm{ideal}} = nRT$$
Now from volume correction term of van der Waals' equation we know that
$$ V_{\textrm{real}} = V_{\textrm{ideal}} - nb $$ where $ V_{\textrm{real}} $ is the volume of the real gas and $ V_{\textrm{ideal}} $ is the volume of the ideal gas. Clearly, $ V_{\textrm{ideal}}$ and $ V_{\textrm{real}} $ are different.
Then how can we write :
$$P_{\textrm{ideal}} (V_{\textrm{ideal}} - nb) = nRT$$
How can we replace $ V_{\textrm{ideal}}$ with $ V_{\textrm{real}}$?