Slide the helmets into each other so that the front faces each other and the logos face you, we call it the Yin and Yang of the helmets. The helmet box closes almost by itself.
If the helmet box can't be locked in the app and the rental can't be ended, this article might help you: I can't finish my rent. Do what?