Let the cost of each fruit be represented as follows;
If the cost of the oranges is 2 dollars less than thrice the cost of the apples, then we would have;
Also, if the cost of pineapples is 2 dollars more than twice the cost of the apples, then we would have;
The total cost of the fruits is given as;
With the values of a, b and c now known;
We can now substitute the value of a to determine the cost of each fruit as follows;