Officially, numbers less than 100 (I think) should be written alphabetically, but it's not that important. You can talk about a nine-hour learning session or a three-hour bus ride.
You can also say, "With nine hours' learning, he was able to master the entire chapter." This means the same as "With nine hours of learning, ... " <-- this is probably easier and more common than the previous way of saying it.