(1) Consider a salt BA of weak acid (HA) and weak base (BOH).
(2) In aqueous solution it undergoes hydrolysis as follows :

(3) The nature of the solution will depend upon relative strength of weak acid and weak base, hence will depend upon their dissociation constants Ka and Kb.
(i) A salt of weak acid and weak base for which Ka > Kb :
Consider hydrolysis of NH4F.

Since Ka(7.2 × 10-4) for HF is greater than Kb (1.8 × 10-5) for NH4OH, the acid dissociates partially more than the base, hence, [H3O+] > [OH-] and the solution reacts acidic after hydrolysis.
(ii) A salt of weak acid and weak base for which Ka < Kb :
Consider hydrolysis of NH4CN.

Since Ka(4 × 10-10) for HF is less than Kb(1.8 × 10-5) for NH4OH, the base dissociates more than acid and hence [H3O+] < [OH-] and the solution reacts basic after hydrolysis.
(iii) A salt of weak acid and weak base for which Ka = Kb :
Consider hydrolysis of CH3COONH4.

Since Ka = Kb, the weak acid CH3COOH and weak base NH4OH dissociate to the same extent, hence, [H3O+] = [OH-] and the solution reacts neutral after hydrolysis.