Each person's financial situation is different, so it is worth a closer look at when it's better to pay off debt or invest.