If cost of 1 apple is ₹ x and 1 chocolate is ₹ y, then the cost of half dozen apples and 2 chocolates is
Cost of one apple = ₹ x
Cost of one chocolate = ₹ y
The cost of half dozen apples is ₹ 6x.
Similarly, the cost of 2 chocolates is ₹ 2y.
So, the total amount spent is ₹ (6x + 2y).