The sum of two numbers Is 31.2/3 of one number is eaual to 5/8 of the other number.find the numbers

N+M=31

2N/3=5M/8

second equation rewritten:
N=15M/16

so
15M/16 + M=31
31M/16=31

M=16
N=15