Answer:
Yes, Bob did the right thing.
Step-by-step explanation:
When a deal falls apart, the broker must return the earnest money to one of the parties, if there is a dispute over the money, then he can turn the money into a court so it decides who should get it. In this case, there is no dispute about who should get the money, and Bob received written instructions from one party telling him to return the money to the other party. He doesn't need to wait to see if the buyer wants the money back, he should just give it back.