Find two given numbers in a given ratio such that the sum of their squares is to their difference in a given ratio. Ratios being 3 : 1 and 10 : 1.