Answer:
Working for the buyer.
Explanation:
When a real estate agent is contracted, he becomes a representative of the seller, and seeks to give the seller best options that will maximise sales.
For example if the real estate agent has multiple offers from his friends and other people he does not know he is obligated to present all offers made to the seller. He is not to favour some buyers over others.
Therefore the real estate agent as a representative of the seller is not working for the buyer.