We know that,
Distance between two points given by =√(x2−x1)2+(y2−y1)2
Here, Let (x2,y2)=P(x,y) and (x1,y1)=(0,0)
⇒OP=√(x−o)2+(y−0)2⇒OP=√x2+y2