In the 1st step of SN1 mechanism a carbocation is formed which is planar .Therefore the nucleophile can attack the carbocation from both the sides. When a nucleophile attacks the carbocation from the side where initially halogen was there,the product with retention in configuration is produce and when nucleophile attacks the carbocation from backside, the product with inversion in configuration is produce. Hence 50% of the product will be with retention in configuration and rest 50% will be with inversion in configuration. This produces a racemic mixture which is optically inactive.
In SN2 reaction mechanism requires the attack of nucleophile from the back side of the carbon atom. So the product assumes a stereochemical position opposite to the leaving group originally occupied. This is called inversion of configuration.
SN1 – Racemisation
SN2 – Inversion
Hence option D is the answer.