Final answer:
There are 3 crates of melons and 45 crates of apples.
Step-by-step explanation:
Let's assume the number of crates of melons to be 'x' and the number of crates of apples to be 'y'.
According to the given information, each crate of melons costs $20 and each crate of apples costs $8.
Using this information, we can form the following equations:
x + y = 48 (equation 1) --> because the total number of crates purchased is 48
20x + 8y = 420 (equation 2) --> because the total cost of the crates is $420
To solve this system of equations, we can use the substitution method or the elimination method.
Let's use the elimination method:
Multiplying equation 1 by 8, we get:
8x + 8y = 384 (equation 3)
Subtracting equation 3 from equation 2, we get:
(20x + 8y) - (8x + 8y) = 420 - 384
12x = 36
Dividing both sides of the equation by 12, we get:
x = 3
Substituting the value of x into equation 1, we get:
3 + y = 48
y = 45
Therefore, there are 3 crates of melons and 45 crates of apples.