The ages of A and B are in the ratio 7 : 5. Ten years hence, the ratio of their ages will be 9 : 7. Find their present ages.