Let 1st number (numerator) be x

let 2nd number (denominator) be y

they are in ratio so theri ratio = x / y

as per sum

1 condition = x / y = 5 / 6

6x = 5y

6x - 5y = 0 ----- 1

2 condition = x-8 / y-8 = 4 / 5

5x - 4y = -32 + 40

5x - 4y = 8 ------- 2

By substitution method

x = 5y / 6 (from 1)

putting value of x in equation 2

5 ( 5y / 6 ) - 4y = 8

25y - 24y / 6 = 8

25y - 24y = 8 X 6

y = 48

putting value of y in equation 1

6x - 5(48) = 0

6x = 240

x = 240 / 6

x = 40

Value of x = 40

Value of y = 48