Greetings, I don't know if you found the solution to your problem but I think you're out of luck. I poked around my P520 as to where this assembly goes and it seems that spring attaches to the bracket and then to a hook at the bottom of the expansion cage:
View: https://imgur.com/GQ4R3wI
Furthermore, that spring is going to be pretty hard to get to and the best angle is blocked by the cage itself:
View: https://imgur.com/ySESrHO
Unless you can blindly hook that spring into position it's almost impossible to put back on. The P520 case has the ability to remove a few panels with a screwdriver but I didn't get that far to confirm if that's completely true, it's very time consuming for just bracket that holds expansion items and you can easily lose a couple fasteners in the process. If you attempt to hook it back up the blind way the best viewing angle to do that is from the front panel:
View: https://imgur.com/YaFmpoJ
If you need to the front panel comes undone with a couple screws up top and a few plastic hangers at the bottom. If it were me and I couldn't get the spring to reattach, I'd just get a shim that is thin enough to hold your optical drive in place and can also let it slide out. Best of luck to you, and I apologize for the photo quality, the glass lens over my phone camera shattered and takes hazy photos.