compound P, and this is converted to X by treatment with HI. Propose a mechanism for this transformation. OH group gets protonated by HI and leaves first. There is then neighbouring group participation by the adjacent sulfur group. I in the product is racemic.
Fig: 1
Fig: 2
Fig: 3