Barium :

with +2 being the charge
Oxygen :

with -2 being the charge
The given equation can be written as:
Ba + O = BaO
Since the sum charges of Barium and Oxygen equals 0, there is no need to add subscripts.
Both Ba and O appear on the left and right side of the equation once, so there is no need to add a coefficient.
Ba + O = BaO is balanced