There isn't a "formula", per se, such as one might use for finding the area of a triangle. But there is logic.
In your case, you have two numbers. They are twenty-four units apart. This means that one of them is twenty-four
more than the other. When you add them, you are, in effect, adding some equal amount to itself, and then adding in another twenty-four.
If the total is sixty, what then (working backwards) must be that equal amount? Then what are the two numbers?
If you get stuck, please reply showing your work and reasoning so far. Thank you!