Presence of electron withdrawing group like $-F, - Cl$ ($-F$ is more electron withdrawing) increases the acidity of carboxylic acids by decreasing electron density on the oxygen atom of $O-H$ bond. Due to it the $O-H$ bond becomes weaker and proton is released easily.
Phenyl group $\left(- C _{6} H _{5}\right)$ is also an electron withdrawing group. But it decreases the acidity of - COOH group when attached to the chain. This is because of $+R$ effect which tends to destabilise the ion.
Thus, the order of acidity is
$\underset{(B)}{CF _{3} COOH} > \underset{(A)}{CCl _{3} COOH} > \underset{(D)}{HCOOH} > \underset{(C)}{C_6H_5COOH}$