Hampi is 13km from Hosapete. There are multiple ways to reach Hampi, Bus, Auto, Cab. You can also rent Bikes and Bicycles. As it was hot due to October heat and we were 3, we preferred Auto. We got Auto for 1000 Rs per day from Railway station. Autowala Uncle also gave us Hampi Map and he covered most of places in two days
You should buy Map of Hampi, it is really useful.