A train come to the station $X$ minuets after 9:00, $X\sim U(0,30)$.
The train stay at the station for 5 minutes and then leave.
A person reaches to the station at 9:20.
Addition:
There was no train when the person came to the station
What is the probability that he didn't miss the train?
Please help me to calculate it, and if you can, please explain me (if you understand) why the detail that that the train stay at the station is necessary?
It should be: $$P(X<15)\;?$$
Thank you!

If the train is still in the station when you arrive you can board it, and if you arrive before it arrives you can wait for it. However, you will miss a train if you arrive after it has left the station.
So, what is the latest time the train can arrive and stay for 5 minutes such that it leaves before 9:20? Then given the uniform distribution of arrival times, what is the probability of not missing the train?
$$P(``\text{not missed}") = P(A\in[15..30])$$
Edit: If you add a condition that no train is at the station at 9:20 then you need to find the conditional probability. Obviously.
$$P(``\text{not missed}"\mid``\text{not there}") = P(A\in[15..30]\mid A\not\in[15..20]) \\ =\frac{P(A\in(20..30])}{P(A\in[0..15)\cup(20..30])}$$