Step 1: Match each reagent
NaOH/CaO gives an alkane, $\text{LiAlH}_4$ gives a primary alcohol, $\text{SOCl}_2$ gives an acyl chloride.
Step 2: Find the anhydride route
Only the dehydration with $\text{P}_2\text{O}_5$ forms the anhydride $RCO-O-COR$.
Step 3: Write the equation
$2RCOOH\xrightarrow{\text{P}_2\text{O}_5,\ \Delta}(RCO)_2\text{O}+\text{H}_2\text{O}$
Final Answer:
Dehydration with P2O5 is the anhydride preparation.
\[ \boxed{\text{(B) }\text{By heating carboxylic acid in excess with P}_{2}\text{O}_{5}} \]