If 20 mL of a 0.1 M NaOH is added to 30 mL of 0.2M CH3COOH (pka=4.74), the pH of the resulting solutiin is
Number of gram equivalents(eq) = moles x acidity of a base (or bascity of an acid.)
Or
= Molarity x Volume in litres x acidity of a base (or bascity of an acid)
So,
Eq(NaOH) = 20/1000 x 0.1 x 1 = 0.002 eq
Eq(CH3COOH) = 30/1000 x0.2 x1 = 0.006 eq
That means acid = base. Hence a salt would be formed in the solution with total volume = 30 + 20 =50 ml
The pH of a strong base weak acid salt solution = 7 + 0.5(pKa +logC) where C is concentration of salt
concentration of salt = eq/volume =1000 x 0.002/50 = 0.4
So
pH = 7 + 0.5(4.74 +log0.4)
pH = 9.171
For such questions always first determine what will exist after the mixture has reacted among itself. Once you know what is present, you can apply the formula.