A cyclist rides a bike at a speed of 12 miles per hour. He plans a trip where he will ride for 3/4 of an hour at this speed. After that, he will ride for 2/3 of the distance he covered in the first part of his trip but at a speed of 9 miles per hour. How far will he ride in total? Let's think step by step and output the final answer within \boxed{}.
user