A small girl in a green shirt plays on a swing.
teen girl plays swing with his friend.
We have no idea if she is a teen, she could be any age. We have no idea if there is a friend present or not, and his should be hers.
You can not infer its a friend.
Not all girls need a friend to play on a swing.