Daniel and his children went into a grocery store and he bought $18 worth of apples and bananas. Each apple costs $2.25 and each banana costs $0.90. He bought a total of 14 apples and bananas altogether. By following the steps below, determine the number of apples, x,x, and the number of bananas, y,y, that Daniel bought.

disregarding the repeated use of the variable names, we have

2.25x + 0.90y = 18.00
x+y = 14
since y = 14-x, we have
2.25x + 0.90(14-x) = 18.00
x = 4
y = 10

Let's assume that Daniel bought x apples and y bananas.

Step 1: Write two equations based on the given information.

Equation 1: The total cost of the apples and bananas is $18.
2.25x + 0.90y = 18

Equation 2: The total number of apples and bananas bought is 14.
x + y = 14

Step 2: Solve the system of equations.

Using equation 2, we can express x in terms of y:
x = 14 - y

Substitute this value of x into equation 1:
2.25(14 - y) + 0.90y = 18

Multiply and simplify:
31.50 - 2.25y + 0.90y = 18
31.50 - 1.35y = 18

Rearrange:
1.35y = 31.50 - 18
1.35y = 13.50

Divide by 1.35:
y = 13.50 / 1.35
y = 10

Step 3: Substitute the value of y back into equation 2 to find x.
x + 10 = 14
x = 14 - 10
x = 4

Therefore, Daniel bought 4 apples (x) and 10 bananas (y).