We know we will need 20 ml of 1M HCl to neutralize the 1 M NaOH. Once we finished the titration the total volume of pH 7 solution is 40ml not 20. To make it a pH of 2 we will need a 0.01M solution.
Then
M1V1=M2V2
0.01 x 40= 1V2
V2= 0.4 (total needed to make the 40 ml pH= 2); total 1 M HCl added 20 ml + 0.4 =20.4