Let x and y represent the larger and smaller numbers, respectively. The problem conditions give rise to two equations:
x + y = 7
5x +4y = 47
You can use the first equation to write an expression for y, then substitute that into the second equation.
y = 7 - x
5x +4(7 -x) = 47 . . . . substitute for y
x + 28 = 47 . . . . . . .. simplify
x = 19 . . . . . . . . . . . . subtract 28
Using our expression for y, we have
y = 7 -19 = -12
The larger number is 19.
The smaller number is -12.