<h3>The cost of 1 pineapple is $ 8 and cost of 1 melon is $ 5</h3>
<u><em>Solution:</em></u>
Let "x" be the cost of 1 pineapple
Let "y" be the cost of 1 melon
<em><u>3 pineapples and 2 melons for $34</u></em>
Therefore,
3x + 2y = 34 -------- eqn 1
<em><u>my friend buys 2 pineapples and 4 melons for $36</u></em>
Therefore,
2x + 4y = 36 --- eqn 2
<em><u>Let us solve eqn 1 and eqn 2</u></em>
<em><u>Multiply eqn 1 by -2</u></em>
-6x -4y = -68 -------- eqn 3
Add eqn 2 and eqn 3
2x + 4y = 36
-6x -4y = -68
( + ) -------------
-4x = -32
<h3>x = 8</h3>
Substitute x = 8 in eqn 1
3(8) + 2y = 34
2y = 34 - 24
2y = 10
<h3>y = 5</h3>
Thus cost of 1 pineapple is $ 8 and cost of 1 melon is $ 5