This reaction is an example of Williamson’s synthesis C2H5O− will extract proton from phenol converting the latter into phenoxide ion But C2H5O− is a better nucleophile than C6H5O− (phenoxide) ion because in the former the negative charge is localised over oxygen, while in the latter it is delocalized over the whole molecular framework. So, it is C2H5O− on that would make nucleophilic attack at ethyl iodide to give diethyl ether (Williamson’s synthesis)