$(P + a/V_2) (V - b) = RT$
P is pressure, V is volume and T is temperature.
$[P] = [F/A] = [MLT _2/L_2] = [ML_1T_2]$
We cannot add or subtract quantities of different dimensions.
Therefore $[P] = [a/V_2] ⇒ [a] = [PV_2] = [ML_1T_2 L_6] = [M L_5 T_2]$
Similarly, $[b] = [V] = [L_3]$