Using the distance formula with fractions