Assistant State's Attorney Joe Michael said the two teens went to the victim's home on May 31 and they all went to a park in the Halfway area.
At one point, the older teen displayed some marijuana and a smoking pipe while they were on a playground, Michael said.
When the victim refused to accompany the other two boys to Halfway Manor, the older boy hit the victim in the face with his fist and took his wallet, Michael said.
The two teens left the area on bicycles and the victim went home to report the attack and robbery.
When Washington County Sheriff's Deputy Bill Malott responded, the victim said he knew the younger teen, Michael said. That boy was questioned and he handed over $3 he got from the robbery.
The older teen was later identified and $15 and some marijuana were recovered.
The remaining $2 was enclosed in an envelope with a letter of apology from the older teen, all of which was presented in court Wednesday.
The victim's father said his son came home upset that day and told his mother what had happened. She went back to the scene but the two boys had left, the father said.
The older teen was described as a special education student with a history of abusive behavior.
The 13-year-old has been a discipline problem at school, according to school officials. His role in the incident was described as passive.
The older boy and his 16-year-old wife are expecting a baby in February, according to his attorney, Michael Morrissette.