p-value for ions in a solution?
It seems like the calculation done or copied from the board by you has gone a little wrong.

In your first step when taking $-\log$ of the given concentration you have ignored the signs on the lower of the argument of the log function.
$$-\log 10^{-3} = \log 10^3 = 3 \log 10 = 3$$
since the base of log here is 10. And same correction for next steps.

And to your other question ... We add up the concentrations (adding up p values is irrevalent) because here NaCl is a strong electrolyte and HCl is a strong acid. They both dissociate completely and individually contribute to the concentration of chlorine anion.