Bookings doesnt happen that way. If confirmed seats are cancelled, RAC (and WL too) tickets will move up towards confirmation.
As in your example, when 5 confirmed passengers cancel their tickets, status of first 5 RAC passengers will become confirmed and status of first 5 WL passengers will become RAC.