This is because substances react in terms of their moles and here even though there mass by volume percentage are same , there moles are different. Thus one of them is limiting and the oyher is in excess and it is the one in excess which will determine the pH of resultant sol.On calculating we find HCl is in excess as follows