The suspected thief stole the bike then bought a train ticket to Lancaster and got on the train with it, said BTP Lancashire on their Twitter feed.
A friend of the victim of the theft saw the lad on the train with the bike.
The friend then confirmed with the victim whether the bike was stolen.
Thunderstorms and heavy downpours of rain predicted to hit Lancashire as Met Office issues yellow weather warning
Man killed in late night crash on A6 Chorley Road near Blackrod
M6, M61 and M55 delays in Preston due to Blackpool Air Show and Lake District holiday traffic
Preston man remains in a critical condition as Lancashire Police appeal for witnesses
Video shows man in van wielding weapon in Preston city centre fight
The friend then informed the conductor by #TextBTP on 61016 that a crime was in progress.
British Transport Police met the train at Lancaster.
The theft suspect was arrested, handed over to @SouthLakesPol, and the bike was recovered.
British Transport Police said they were in the #RightPlaceRightTime.
They also said it was great use of their #TextBTP on 61016
In an emergency always dial 999.
The BTP 61016 text service offers public and rail staff a means to contact them to report non-emergency crime.