
Alkylation:
$$\begin{aligned}\text{C}_6\text{H}_5\text{--OCH}_3 + \text{CH}_3\text{Cl} \xrightarrow{\text{Anhyd. AlCl}_3} 4\text{-methoxytoluene (Major)} + 2\text{-methoxytoluene (Minor)} + \text{HCl}\end{aligned}$$
Acylation:
$$\begin{aligned}\text{C}_6\text{H}_5\text{--OCH}_3 + \text{CH}_3\text{COCl} \xrightarrow{\text{Anhyd. AlCl}_3} 4\text{-methoxyacetophenone (Major)} + 2\text{-methoxyacetophenone (Minor)} + \text{HCl}\end{aligned}$$
Concept: Anisole undergoes electrophilic aromatic substitution ($$S_E\text{Ar}$$) when treated with an alkyl halide or an acyl halide in the presence of a Lewis acid catalyst like anhydrous aluminum chloride ($$\text{AlCl}_3$$). The methoxy group ($$\text{--OCH}_3$$) activates the aromatic ring and directs the incoming alkyl or acyl electrophile to the ortho and para positions.