Since acid chloride is more reactive than alkyl halide \(-\,COCl\) group will react first.
In the second step, Friedel craft's alkylation occurs in a position that is ortho to alkoxy group and para to methoxy group. Both mahoxy and alkoxy groups are ortho para directing group.