Dear Student,
The alcoholic solution of AgNO2 reacts with ethyl alcohol to form nitrethane because the bond between Ag and O is covalent in nature and the lne pair on N forms the nucleophilic site for the attack during tthe substitution reaction.
In the first step the diethyl ether and HNO2 are formed. Then the HNO2 attacks on the Carbonium ion centre and forms nitroethane.The alcohol present serves as reaction medium.
Regards!