First of all, don't let your friend near a USB flash drive EVER again! :P Apart from that, soldering is about your only option.
If you have a Raspberry Pi or old computer that you wouldn't mind if you fried the port, you could try carefully plugging it in. Like already mentioned, a USB extension cable will give you the access to more carefully plug it into the computer. If you're that desperate to risk a perfectly good computer, go ahead and use your main one.
If you can see a break in the connection, don't do it. Worse things could happen than your math homework missing.
As for soldering, it seems like it is only the connector that is damaged. If the PCB is fine, you could do this:
- Take an old USB cable and cut the B end off. Strip the newly exposed wires.
- Take a soldering iron and carefully solder the wires on. If you have an old sock/etc. I might say put that over the main chip in case the iron slips so the chip isn't damaged. It isn't foolproof, but it is better than nothing.
- Make sure all the connections are not dry joints and they don't bridge.
- After all the wires are soldered, add a ton of hot glue over it. I'd say wrap it around the main board a few times in case you accidentally tug on the wire so it doesn't undo itself. This is just a best practice thing, so not required.
- Plug it into your
enemy's computer and cross your fingers.
If it has some sort of read only switch, I'd advise you to use that to make sure that you don't corrupt the file.