The math is all great, above, but it still decries the common sense response:
If I purchase two apples from the first vendor and three apples from the second vendor, I have purchased five apples for two Rs. Therefore, five apples for two Rs should work. This is, in fact, true if you do not have a limited number of apples.
But we do.
Let's say ten people each come by the two brother's stands, and each of these ten people purchased two apples from the first vendor, and three apples from the second vendor. At the end of this sequence, we have had 10 people purchase 50 apples, at five apples for two Rs each.
HOWEVER! The second vendor is now out of apples! Only the first vendor still has apples remaining. The next two people who want five apples each must purchase only at the first vendor's stand - and the first vendor is two apples for an Rs. Therefore, they will spent 2.5 Rs for five apples, instead of 2 Rs.
The first ten people spent 2 Rs each for a total of 20 Rs. The last two people spent 2.5 Rs each for a total of 5 Rs.
However, when all 60 apples are combined for a total price of 5 apples for 2 Rs, those last two people spent 2 Rs each for a total of 4 Rs. And THAT is where the missing Rs went.