Explanation:
[tex]V = IR \Rightarrow R = \dfrac{V}{I}[/tex]
Plugging in the numbers, we get
[tex]R=\dfrac{4.5\:\text{V}}{0.5\:\text{A}} = 9.0[/tex] ohms