How do I set this up and how to solve it?

Russ bought 3 medium and 2 large submarine sandwiches for $29.95. Stacy bought 4 medium and 1 large submarine sandwiches for $28.45. What is the price for each medium and each large submarine sandwich?

3 m + 2 L = 29.95

4 m + 1 L = 28.45

3 m + 2 L = 29.95
8 m + 2 L = 56.90
-------------------

-5 m = - 26.95

m = 5.39
L = 28.45 -4(5.39) = 6.89

To solve this problem, we can set up a system of equations.

Let's represent the price of a medium submarine sandwich as "M" and the price of a large submarine sandwich as "L".

From the given information, we know that:
3M + 2L = 29.95 -- Equation (1)
4M + 1L = 28.45 -- Equation (2)

Now, we can solve this system of equations using either elimination or substitution method. Let's use the substitution method:

Step 1: Solve Equation (2) for L:
L = 28.45 - 4M

Step 2: Substitute the value of L in Equation (1):
3M + 2(28.45 - 4M) = 29.95

Step 3: Simplify the equation:
3M + 56.9 - 8M = 29.95
-5M + 56.9 = 29.95

Step 4: Move constants to one side:
-5M = 29.95 - 56.9
-5M = -26.95

Step 5: Divide by -5 to solve for M:
M = (-26.95) / (-5)
M = 5.39

Now that we have the value of M, we can substitute it back into one of the original equations to find the value of L:

Using Equation (2):
4(5.39) + 1L = 28.45
21.56 + L = 28.45
L = 28.45 - 21.56
L = 6.89

So, the price per medium submarine sandwich (M) is $5.39 and the price per large submarine sandwich (L) is $6.89.

To solve the problem, you can set up a system of equations with two variables. Let's use the variables 'm' to represent the price of each medium submarine sandwich and 'l' to represent the price of each large submarine sandwich.

Let's start by writing down the equations based on the given information:

1) Russ bought 3 medium and 2 large submarine sandwiches for $29.95:
3m + 2l = 29.95

2) Stacy bought 4 medium and 1 large submarine sandwiches for $28.45:
4m + l = 28.45

To solve this system of equations, we can use a method called substitution or elimination. In this case, let's use the elimination method to solve it.

Multiply equation 2 by 2 to make the 'l' coefficients the same:
8m + 2l = 56.90

Now, subtract equation 1 from this new equation:
(8m + 2l) - (3m + 2l) = 56.90 - 29.95
8m + 2l - 3m - 2l = 26.95

Simplify the equation:
5m = 26.95

Divide both sides by 5 to solve for 'm':
m = 26.95 / 5
m ≈ 5.39

Now that we have the value of 'm', we can substitute it back into one of the original equations (let's use equation 1) to find the value of 'l':

3(5.39) + 2l = 29.95
16.17 + 2l = 29.95
2l = 29.95 - 16.17
2l = 13.78

Divide both sides by 2 to solve for 'l':
l = 13.78 / 2
l ≈ 6.89

Therefore, the price for each medium submarine sandwich is approximately $5.39, and the price for each large submarine sandwich is approximately $6.89.