You are correct! Hydrogen atoms will have an inert gas configuration with a total of 2 electrons and the oxygen atom will require 8 electrons for an inert gas configuration.