How do you say

I've reserved a train ticket three weeks in advance.

..in Chinese?

我在网上预定了三周后的火车票。

wǒ zài wǎng shàng yù dìng le sān zhōu hòu de huǒ chē piào 。

How do you say "He’s been training hard for the last three months, with a view to competing." in Chinese?