The reaction is an example of Friedel-Crafts acylation. The acylium ion (\(\text{RCO}^+\)) generated by the reaction of acyl chloride with \(\text{AlCl}_3\) acts as an electrophile and attacks benzene to form the acylated product.
\[ 6(-C=O)-C=O \]
Thus, the major product is:
\[ P = 6(-C=O)(-COPh) \]
Nucleophiles attack at that part of the substrate molecule which is electron deficient. The reaction in which a nucleophile replaces an already existing nucleophile in a molecule is called a nucleophilic substitution reaction. Haloalkanes are substrates in these reactions. In this type of reaction, a nucleophile reacts with a haloalkane (the substrate) having a partial positive charge on the carbon atom bonded to halogen. A substitution reaction takes place, and the halogen atom, called the leaving group, departs as a halide ion. Since the substitution reaction is initiated by a nucleophile, it is called a nucleophilic substitution reaction.
\(Nu^− +C-X →C-Nu+X^−\)