IRL basketball help

A couple of things I’d like to ask you guys. First off, I live in a neighborhood with a tennis court that has two portable hoops on it. One of them is in nice condition and the other fell rim first during a bad wind storm. Now the rim is bent upwards, sort of like one of those mini hoops you put on a door. Is there any way to unbend this rim? Really not looking to spend $50 to replace something that isn’t mine lol.

Second thing, how do you measure the distance for NBA 3 point line? is it from the baseline or from there hoop is extended into the court floor?

Any advice would be greatly appreciated