Calculates the best order to pay off debt