The 17-year-old was biking home towards Cromwell just after 9.30pm when he came across the accident near the Bannockburn Bridge.
He had noticed a pair of headlights coming towards him and expected the vehicle to pass, but when the headlights disappeared he knew something was wrong.
Shortly after, Riley came across a cloud of dust, glass on the road and a mangled car.
A passer-by with a torch had stopped and was calling the emergency services.
There was no-one in the vehicle.
Another person stopped and the three of them began looking among the debris in the dark for the driver.
Riley said he felt the need to look in the nearby ditch.
"I felt there was someone there, looked in the ditch and there was a guy about 20m-30m from his car."
"I called out to the other two people there and they ran down. He was on his face ... and we couldn’t see if he was breathing, so we rolled him over carefully on his back."
He started cardiopulmonary resuscitation (CPR) while another man worked on the victim’s breathing.
"It felt like 15 minutes until the fire truck got there, then they took over," Riley said.
"[The first responders] asked me if I wanted to keep going or have them take over.
"I was good to keep going but thought it was better to have a professional do it."
It was his first experience of real CPR, having only done some first aid through school.
"I’ve never had to do CPR on someone, apart from a plastic doll."
At home after the incident, he was coping "fine" but had felt "a bit of adrenaline", Riley said.
Police said they responded to a single vehicle crash in Bannockburn Rd about 9.45pm on Tuesday and found a person with critical injuries.
Despite CPR, the victim was unable to be revived and died at the scene, they said.