Beside the box
旁边pángbiān
Use 旁边 to say that something is next to a reference object.
Move the ball
Use the box as the reference point. For front and back, look from where you are standing.
Beside
球在盒子旁边。
Qiú zài hézi pángbiān.
The ball is beside the box.
Inside
球在盒子里。
Qiú zài hézi lǐ.
The ball is inside the box.
Above
球在盒子上方。
Qiú zài hézi shàngfāng.
The ball is above the box.