sum of two numbers is 40. the difference of 5 times the larger and 4 times the smaller exceeds 7 times the smaller by 8. Find the numbers

M+N=40

5M-4N=7N-8

The difference between two numbers is 34. The larger exceeds 3 times the smaller by 4. Find the numbers.

To solve this problem, let's assign variables to the two numbers.

Let's say the larger number is x and the smaller number is y.

From the problem statement, we know two things:
1) The sum of the two numbers is 40: x + y = 40
2) The difference of 5 times the larger number (5x) and 4 times the smaller number (4y) exceeds 7 times the smaller number (7y) by 8: 5x - 4y = 7y + 8

Now, we have a system of two equations:

Equation 1: x + y = 40
Equation 2: 5x - 4y = 7y + 8

We can solve this system using substitution or elimination method. Let's use substitution:

From Equation 1, we can rewrite it as x = 40 - y. Now, substitute this value of x into Equation 2:

5(40 - y) - 4y = 7y + 8

Simplify the equation:

200 - 5y - 4y = 7y + 8

Combine like terms:

200 - 9y = 7y + 8

Move variables to one side:

-9y - 7y = 8 - 200

-16y = -192

Divide by -16 to solve for y:

y = (-192) / (-16) = 12

Now, substitute the value of y back into Equation 1 to find x:

x + 12 = 40

x = 40 - 12 = 28

Therefore, the larger number is 28, and the smaller number is 12.