You can use a proportion.
2/3 inch is to 1 hour as 6 2/3 inch is to x hours.
[tex] \dfrac{\frac{2}{3}~inch}{1~hour} = \dfrac{6 \frac{2}{3}~inch}{x} [/tex]
Cross multiply to get
[tex] \dfrac{2}{3} x = 6 \dfrac{2}{3} [/tex]
[tex] \dfrac{2}{3} x = \dfrac{20}{3} [/tex]
[tex] 2x = 20 [/tex]
[tex] x = 10 [/tex]
Answer: It rained for 10 hours.