You put a check mark beside nbubis' answer indicating that it solved your problem but I think that actually, you're missing something so it didn't solve your problem. I will give an answer that attempts to fill in what I think you're missing. If you treat distance as an undefined concept and assume that satisfies the following properties
- For any points $(x, y)$ and $(z, w)$ in $\mathbb{R}^2$, $d((0, 0), (z, w)) = d((x, y), (x + z, y + w))$
- For any point $(x, y)$ in $\mathbb{R}^2$, $d((0, 0), (x, y))$ is nonnegative
- For any nonnegative real number $x$, $d((0, 0), (x, 0)) = x$
- For any point $(x, y)$ in $\mathbb{R}^2$, $d((0, 0), (x, -y)) = d((0, 0), (x, y))$
- For any points $(x, y)$ and $(z, w)$ in $\mathbb{R}^2$, $d((0, 0), (xz - yw, xw + yz)) = d((0, 0), (x, y))d((0, 0), (z, w))$
- The area of any square in $\mathbb{R}^2$ is the square of the length of its edges
- $\forall x \in \mathbb{R}d((0, 0), (\cos(x) ,\sin(x))) = 1$
then yes you can prove it. The Pythagoren theorem is equivalent to the statement that distance satisfies properties 1 and 5. Property 1 just shows that the Pythagorean theorem holds for all right angle traingles in $\mathbb{R}^2$ whose legs are parallel to the axes. Using property 5, we can deduce from that that the Pythagorean theorem holds for all right angle triangles, not just the ones whose legs are parallel to the axes.
That still sweeps under the rug the issue of why we can treat it like distance is an undefined concept that we can assume satisfies those properties. As shown in this answer, $d((x, y), (z, w)) = \sqrt{(z - x)^2 + (w - y)^2}$ is the unique function satisfying the first 5 properties and it also satisfies properties 6 and 7. We can decide that as a result of that, we can define the distance formula to be $d((x, y), (z, w)) = \sqrt{(z - x)^2 + (w - y)^2}$.