The Henderson-Hasselbalch equation is pH = pKa + log [salt] / [acid].
To make a buffer of pH = 4.7, place this value in the Henderson-Hasselbalch equation and solve for the ratio of salt to acid concentrations. This gives 0 = log [salt] / [acid]. Taking the antilog of both sides yields [salt] / [acid] = 1. This means that the ratio of concentrations has to be 1:1. As the starting concentrations are the same, this means that 5 mL of each solution should be mixed to give the pH of 4.7.
For a pH of 5.7, the Henderson-Hasselbalch equation is 5.7 = 4.7 + log [salt] / [acid] or
1 = log [salt] / [acid]. Taking antilog of both sides gives [salt] / [acid] = 10.
In this case the ratio of the concentrations used should be 10:1. So, if X ml of acid is used, then 10 - X mL of salt solution must be used. As the starting concentrations are the same, 10-X / X =10,
so X = 0.91 mL for the acid and 9.1 mL for the salt.