Jordan rode his bike along a trail at an average speed of 12 miles per hour for x hours. He then continued along the same trail on foot, walking at an average speed of 4 miles per hour for 3 hours. The total distance he traveled was 36 miles.
What is the value of x?