Let the two no be x and y
therefore x / y = 5 / 6
6 * x = 5 * y
6 * x - 5 * y = 0 * 5
30 * x - 25 * y = 0 ..................(i)
also (x - 8)/(y - 8) = 4 / 5
5 * x - 40 = 4 * y - 32
5 * x - 4 * y - 8 = 0 *6
30 * x - 24 * y - 48 = 0 .....................(ii)
subtracting (i) from (ii)
y - 48 = 0
y = 48
putting y = 48 in x/y = 5/6
x/48 = 5/6
x = 5 * 48 / 6
x = 5 * 8
x = 40
therefore the two numbers are 40 and 48