Andrew purchases his first dwelling, which he will use as a buy-to-let whilst he lives at home with his parents. At the end of the day that is the effective date of the transaction, Andrew owns one dwelling. He does not own any other dwelling and does not run a property investment or property trading business, so he will not pay the ADS, even though he is not using it as his main residence.
However, if Andrew purchased his first dwelling acting as a sole trader or in a partnership of which that he is a partner, in the course of a business the sole or main activity of which is investing or dealing in property, the ADS would apply.
Two years later, Andrew purchases a dwelling which he will use as his main residence, but he also decides to keep his buy-to-let dwelling. In this instance, as he owns two dwellings at the end of the day that is the effective date of the transaction and has not replaced a main residence (as he has not sold a previous main residence), the ADS will apply.