Can anyone explain the ohm's law apply here?
Because ohm's law is actually:

$$\Delta V=RI &lt;=&gt; Va-Vb=RI_{ab}$$ 

Where Va is the voltage at one terminal of the resistor, and Vb is the voltage at the other terminal. I just added the little index to the current so that you know its direction.

The delta is often omitted for simplicity, and this usually leads to a lot of confusion from beginners.