The distance formula for polar coordinates is

#d=sqrt(r_1^2+r_2^2-2r_1r_2Cos(theta_1-theta_2)#

Where #d# is the distance between the two points, #r_1#, and #theta_1# are the polar coordinates of one point and #r_2# and #theta_2# are the polar coordinates of another point.

Let #(r_1,theta_1)# represent #(5,(7pi)/4)# and #(r_2,theta_2)# represent #(-4,pi)#.

#implies d=sqrt(5^2+(-4)^2-2*5*(-4)Cos((7pi)/4-pi)#

#implies d=sqrt(25+16+40Cos((3pi)/4)#

#implies d=sqrt(41+40*(-0.7071))=sqrt(41-28.284)=sqrt(12.716)=3.56595# units

#implies d=3.56595# units (approx)

Hence the distance between the given points is #3.56595# units.