Is ID the primary key of the RentTable or is it the ID of the guest?
If it ist the ID-number of a guest or you don't really need to select it if it is the primary key you can do this in just one SQL Statement:
SELECT ID, Guest, sum(CostPaid) FROM RentTable GROUP BY ID, Guest
(If ID is the ID-number of a guest)
SELECT Guest, sum(CostPaid) FROM RentTable GROUP BY Guest
(If ID is the primary key of RentTable)