pH = -log [H⁺] ←←[log without a specified base means log base 10]
and if you want to use the hydronium ion concentration then use pH = -log [H₃O⁺]
either way the calculation is the same:
They give that a 0.1 M solution of NaHCO₃ has a hydrogen ion concentration of 4.0 x 10^(-9)
so pH = -log (4.0 x 10^(-9))
pH = 8.4