Just plug x and y into Pythagorus' equation, and see if you get the right value for r.
which luckily is what you started with...