Distance between A and B=√((3-(-1))2+(-5-1)2)=√(42+62)=√52=2√13=7.2111 approx.
Distance between C and D=√((5-2)2+(-4-4)2)=√(32+82)=√73=8.5440 approx.
If you need the shortest distance between AB and CD (extended) it's 0 because the lines AB and CD are not parallel so they intersect. But the shortest distance between any two points is BD=√((5-3)2+(-4-(-5))2)=√(22+12)=√5=2.2361.
Other distances are AC=3√2=4.2426, AD=√61=7.8102, BC=√82=9.0554.