As part of a class project. Mesut collected $126 in donations for a local hospice. That amount was 7% of the total amount collected by the class. How much money did the class collect in all?

Could you also explain how you achieved the answer. I'm having trouble solving these types of problems.

Thanks!