X’s initial capital = Rs. 700, Y’s capital = Rs. 600
For the first 3 months, X’s investment remains Rs. 700.
After 3 months, X withdraws \( \frac{2}{7} \) of 700:
\[
\frac{2}{7} \times 700 = 200
\]
Remaining capital:
\[
700 - 200 = 500
\]
After another 3 months, X puts back \( \frac{3}{5} \) of what he withdrew:
\[
\frac{3}{5} \times 200 = 120
\]
New capital:
\[
500 + 120 = 620
\]
Investment time-weighted:
\[
700 \times 3 + 500 \times 3 + 620 \times 6 = 2100 + 1500 + 3720 = 7320
\]
Y’s total contribution:
\[
600 \times 12 = 7200
\]
Ratio of profit division:
\[
\frac{7320}{7320 + 7200} \times 726 = \frac{7320}{14520} \times 726
\]
\[
X's \text{ share} = 366
\]
Thus, X should receive Rs. 366.