Joe sold a total of 10 baked goods at the fundraiser. Each cookie costs $1.25 and each brownie costs $2.50. Joe made $20 at the fundraiser. How many cookies did Joe sell?

Please help I am sooooooo confused

Let's assume Joe sold x cookies and y brownies.

Given that each cookie costs $1.25 and each brownie costs $2.50, the total amount Joe made can be expressed as:
1.25x + 2.50y = 20 (Equation 1)

We also know that Joe sold a total of 10 baked goods, so we have another equation:
x + y = 10 (Equation 2)

To determine how many cookies Joe sold, we can solve these two equations simultaneously.

Rearranging Equation 2, we can express y in terms of x:
y = 10 - x

Substitute this into Equation 1:
1.25x + 2.50(10 - x) = 20

Simplifying the equation:
1.25x + 25 - 2.50x = 20
-1.25x = -5

Dividing both sides by -1.25:
x = 4

Therefore, Joe sold 4 cookies.

To find out how many cookies Joe sold, we can set up an equation based on the information given.

Let's assume Joe sold x cookies and y brownies.

We know that the cost of each cookie is $1.25, so the total amount he made from selling cookies is 1.25x.

We also know that the cost of each brownie is $2.50, so the total amount he made from selling brownies is 2.50y.

According to the given information, Joe made a total of $20, so we have the equation:

1.25x + 2.50y = 20.

We are asked to find the number of cookies sold, so we need to find the value of x.

Now, let's solve the equation.

Since we know that Joe sold a total of 10 baked goods, we can express this as another equation:

x + y = 10.

Now, we have a system of two equations:

1.25x + 2.50y = 20,
x + y = 10.

We can use substitution or elimination to solve this system of equations. Let's use the elimination method.

By multiplying the second equation by -1.25, we can eliminate the x term:

-1.25(x + y) = -1.25(10),
-1.25x - 1.25y = -12.5.

Now we have the following system of equations:

1.25x + 2.50y = 20,
-1.25x - 1.25y = -12.5.

Adding these equations together, we get:

2.50y - 1.25y = 20 - 12.5,
1.25y = 7.5.

Dividing both sides by 1.25, we find that:

y = 6.

Now that we have the value of y, we can substitute it back into the second equation to find the value of x:

x + 6 = 10,
x = 10 - 6,
x = 4.

Therefore, Joe sold 4 cookies at the fundraiser.

number of cookies ---- x

number of brownies ----- y
x + y = 10 ----> y = 10-x

1.25x + 2.5(10-x) = 20

now just solve for x and after that you can get y from y = 10-x