To solve the problem, we will follow these steps:
### Step 1: Calculate the total cost of the sugar purchased.
The trader purchased 500 kg of sugar at Rs 40 per kg.
\[
\text{Total Cost} = \text{Quantity} \times \text{Cost per kg} = 500 \, \text{kg} \times 40 \, \text{Rs/kg} = 20000 \, \text{Rs}
\]
### Step 2: Calculate the selling price of the first 200 kg sold at a profit of 10%.
The selling price can be calculated using the formula:
\[
\text{Selling Price} = \text{Cost Price} + \text{Profit}
\]
The profit for 200 kg at a cost price of Rs 40 per kg with a 10% profit is:
\[
\text{Profit} = 200 \, \text{kg} \times 40 \, \text{Rs/kg} \times 0.10 = 800 \, \text{Rs}
\]
Thus, the selling price for 200 kg is:
\[
\text{Selling Price} = 8000 \, \text{Rs} + 800 \, \text{Rs} = 8800 \, \text{Rs}
\]
### Step 3: Calculate the selling price of the next 120 kg sold at a loss of 5%.
The loss for 120 kg at a cost price of Rs 40 per kg with a 5% loss is:
\[
\text{Loss} = 120 \, \text{kg} \times 40 \, \text{Rs/kg} \times 0.05 = 240 \, \text{Rs}
\]
Thus, the selling price for 120 kg is:
\[
\text{Selling Price} = 4800 \, \text{Rs} - 240 \, \text{Rs} = 4560 \, \text{Rs}
\]
### Step 4: Calculate the total selling price from the first two transactions.
Now, we add the selling prices of both transactions:
\[
\text{Total Selling Price} = 8800 \, \text{Rs} + 4560 \, \text{Rs} = 13360 \, \text{Rs}
\]
### Step 5: Calculate the total amount of sugar sold.
The total amount of sugar sold is:
\[
\text{Total Sugar Sold} = 200 \, \text{kg} + 120 \, \text{kg} = 320 \, \text{kg}
\]
### Step 6: Calculate the remaining sugar.
The remaining sugar is:
\[
\text{Remaining Sugar} = 500 \, \text{kg} - 320 \, \text{kg} = 180 \, \text{kg}
\]
### Step 7: Calculate the required total selling price to achieve a 12% profit on the initial investment.
To achieve a 12% profit on the initial investment of Rs 20000:
\[
\text{Required Selling Price} = \text{Cost Price} + \text{Profit} = 20000 \, \text{Rs} + (20000 \, \text{Rs} \times 0.12) = 20000 \, \text{Rs} + 2400 \, \text{Rs} = 22400 \, \text{Rs}
\]
### Step 8: Calculate the required selling price of the remaining sugar.
The required selling price of the remaining sugar can be calculated by subtracting the total selling price from the required selling price:
\[
\text{Required Selling Price for Remaining Sugar} = 22400 \, \text{Rs} - 13360 \, \text{Rs} = 9040 \, \text{Rs}
\]
### Step 9: Calculate the selling price per kg of the remaining sugar.
To find the selling price per kg of the remaining 180 kg of sugar:
\[
\text{Selling Price per kg} = \frac{\text{Required Selling Price for Remaining Sugar}}{\text{Remaining Sugar}} = \frac{9040 \, \text{Rs}}{180 \, \text{kg}} \approx 50.22 \, \text{Rs/kg}
\]
Thus, the trader should sell the remaining sugar at approximately **Rs 50.22 per kg** to gain a 12% profit on his initial investment.