Thumbs down [Q] Soft bricked Nexus with a locked bootloader

My problem is that the device is stuck at the Google screen when it's turned on. I bought this off ebay not realizing the bootloader was locked. I can get to the bootloader but if I choose any of the options it says "bootloader failed" or "recovery failed" and so on. It will charge when connected to my mac computer but Android File Transfer doesn't recognize there's a device connected.

I've never dealt with this before. And as you can see, I can't go into the settings of the device because I can't turn it on. Can anyone help me flash this back to its stock rom?

Programs for mac would be best but I can use Windows if I need to.