At least the boy had the decency to let her out and befriend her.
The boy also had the indecency to stuff her into the box in the first place. He was the one who captured her, so that's all on him.
He could have asked her right there and then to be his friend, and instead he does this.