I was sad to learn afterward that my motorcycle , sliding on ahead of me , had smashed into a flag marshal , breaking both his legs and putting him in the hospital for many months .. This sentence is hard to understand. A simpler version with equivalent meaning is the following:
As I later learned , when my motorcycle slid away from me , it unfortunately hit someone who was standing as a marshal . The man had to spend many months in the hospital with broken legs .