Weak acids and bases have low energy than strong acids and bases.
The chemical equilibria shift the reaction side with the species having lower energy.
Given reaction is an acid-base reaction in which the equilibrium favors the starting material that means it will go to the side of the weakest acid that is acetic acid is weaker than butyric acid.