Shaquib Ali, 20 of Cecil Road, Brent, London, was sentenced to 18 months’ imprisonment after admitting two counts of possession of a knife.
He also pleaded guilty to possession of cannabis and causing criminal damage to police property after he pulled a telephone off the wall.
The first incident took place just after midnight on 13 November 2018, with the second incident taking place later that night around 10pm.
CCTV images subsequently showed Ali placing a knife in the stairwell of the underpass at Woking train station around 12.30am after officers were called following reports of a group of men with a knife in Chertsey Road.
Shortly before 10pm on the same day, the group were involved in another altercation, with a knife again spotted on CCTV.
The trio attempted to hide it behind a newspaper stand at Woking station but were arrested by officers soon afterwards.
A 17-year-old from Woking was given a 12 month youth referral order after admitting one count of possession of a knife.
An 18-year-old from London received 12 months imprisonment, suspended for 18 months, and was ordered to pay a victim surcharge of £115 after pleading guilty to the same offence.
Investigating officer, PC Chris Laughton said: “This sentence sends out a message that even carrying a knife is unacceptable.
“Anyone with information on knife crime can call 101 or report online. In an emergency, always dial 999.”