The average cost of 5 oranges and 4 guavas is 36 naira:
5
x
+
4
y
2
=
36
2
5x+4y
=36
Multiplying both sides by 2:
5
x
+
4
y
=
72
(Equation 1)
5x+4y=72(Equation 1)
The average cost of 7 oranges and 8 guavas is 48 naira:
7
x
+
8
y
2
=
48
2
7x+8y
=48
Multiplying both sides by 2:
7
x
+
8
y
=
96
(Equation 2)
7x+8y=96(Equation 2)
Now, we solve these two equations to find
x
x and
y
y.
From Equation 1:
5
x
+
4
y
=
72
(Multiply this by 2)
5x+4y=72(Multiply this by 2)
10
x
+
8
y
=
144
(Equation 3)
10x+8y=144(Equation 3)
Subtract Equation 2 from Equation 3:
(
10
x
+
8
y
)
−
(
7
x
+
8
y
)
=
144
−
96
(10x+8y)−(7x+8y)=144−96
3
x
=
48
3x=48
x
=
16
x=16
Now, substitute
x
=
16
x=16 into Equation 1:
5
(
16
)
+
4
y
=
72
5(16)+4y=72
80
+
4
y
=
72
80+4y=72
4
y
=
72
−
80
4y=72−80
4
y
=
−
8
4y=−8
y
=
−
2
y=−2
So, the cost of one orange is 16 naira, and the cost of one guava is -2 naira (this negative value suggests that perhaps there’s a discount associated with guava, though this is unusual in a simple pricing problem).
Finally, the total cost of 24 oranges and 24 guavas:
Total cost
=
24
x
+
24
y
=
24
(
16
)
+
24
(
−
2
)
=
384
−
48
=
336
naira
.
Total cost=24x+24y=24(16)+24(−2)=384−48=336 naira.