The question itself is invalid. The 4rs. in the servant's pocket is part of the 54rs. that was paid by the three friends, so it makes no sense to add the two.
Take some extreme values. Suppose the three friends come in and pay $1,000,000 for the pen, and the servant is supposed to return $999,999 but returns nothing and pockets it all. The friends have paid $1,000,000 and the servant has $999,999. So where is the missing $1,999,999?