Call the two points A and B:
A=(r_a, theta_a) = (1, (3pi)/4)
B=(r_b, theta_b) = (5, (5pi)/8)
Convert them to rectangular form:
A=(x_a, y_a)
x_a = r_acos(theta_a) = 1*cos((3pi)/4) = -sqrt(2)/2
y_a = r_asin(theta_a) = 1*sin((3pi)/4) = sqrt(2)/2
A=(-sqrt(2)/2, sqrt(2)/2)~~(-0.707,0.707)
B=(x_b, y_b)
x_b = r_bcos(theta_b) = 5*cos((5pi)/8) = -5sqrt(2 - sqrt(2))/2
y_b = r_bsin(theta_b) = 5*sin((5pi)/8) = 5sqrt(2+sqrt(2))/2
B=(-5sqrt(2-sqrt(2))/2, 5sqrt(2+sqrt(2))/2)~~(-1.913,4.619)
Now apply the Pythagorean Theorem to find the length of the line segment bar(AB).
||bar(AB)|| = sqrt((x_b-x_a)^2+(y_b-y_a)^2)
||bar(AB)|| ~~sqrt(((-1.913)-(-0.707))^2+(4.619-0.707)^2)
||bar(AB)|| ~~sqrt((-1.206)^2+(3.912)^2)=sqrt(1.455+15.306)
||bar(AB)|| ~~sqrt(16.761)~~4.094