Step 1: Recall the detergent types.
Detergents are classed as anionic, cationic, or non-ionic. Toothpastes use an anionic detergent, while hair conditioners use a cationic detergent.
Step 2: Identify X for toothpaste.
The common anionic detergent in toothpaste is sodium lauryl sulfate, $CH_3(CH_2)_{10}CH_2OSO_3Na$. So X is this sulfate salt.
Step 3: Identify Y for hair conditioner.
Hair conditioners use cationic quaternary ammonium salts, such as $CH_3(CH_2)_{15}N(CH_3)_3Br$, which reduce static and smooth the hair. So Y is this ammonium salt.
Step 4: Test the other options.
Triglyceride esters (like $(C_{15}H_{31}COO)_3C_3H_5$) are soaps or fats, not the toothpaste detergent, and non-ionic ethoxylates are not the conditioner here, so those pairs are wrong.
Step 5: Combine X and Y.
The correct pairing is anionic $CH_3(CH_2)_{10}CH_2OSO_3Na$ for X and cationic $CH_3(CH_2)_{15}N(CH_3)_3Br$ for Y.
Step 6: Choose the option.
This pair matches option (4).
\[ \boxed{X=CH_3(CH_2)_{10}CH_2OSO_3Na,\ \ Y=CH_3(CH_2)_{15}N(CH_3)_3Br\ \ \text{(Option 4)}} \]