In this scenario, Person C still owns the stock and will gain/lose with the stock's rise/fall. Person A borrowing from C at the end is just borrowing, not buying. At some point Person A needs to return stock to Person C.
You might be asking instead about the following scenario, though, where a single share is borrowed and sold short multiple times:
Person A borrows from Person C and sells to Person B
Person D borrows from Person B and sells it to Person E
Well, the covering of the shorts doesn't have to happen in an atomic transaction; there are thousands to millions of trades of a single ticker every day. Just as a single share can create a chain of multiple shorts (borrows and sales), a single share can cover multiple shorts too through a chain of trades.