You seem to have 3 questions here:
Can you buy a house from someone in arrears on taxes & HOA?
How long can a homeowner take to redeem a foreclosure by HOA?
How long can a homeowner take to redeem a foreclosure for real property taxes?
You can always buy a property from someone, but it may come subject to existing liens. Normally, Realtors sell houses where the title is treated as clear of encumbrances ("treat as clear"). Most Realtors don't think beyond what a title company will tell them.
Title insurance can be issued subject to liens - it's done all the time. But that may be a waste of your money to get it. The title search which the insurance is based on will tell you if you have other encumbrances you weren't aware of, like other owners, etc. So, at a minimum get a title search report from a title company.
Redemption is a concept that applies to certain types of foreclosure. HOAs and sheriffs sell houses subject to superior liens, like Federal taxes and so on. Usually, the mortgage lien is inferior to the tax lien, which makes mortgage companies want to pay those taxes to avoid foreclosure by the sheriff.
Usually the HOA lien is inferior to the mortgage lien by action of the subordination clause contained in most CCRs. This means the HOA can foreclose but gets the property with the mortgage lien intact and owing. The mortgage company can then foreclose on the HOA for non-payment. Most HOAs are ignorant of this and can lose the cost of the foreclosure to the mortgage foreclosure.
A homestead can be redeemed in most cases by making a demand of the party who foreclosed as to the exact amount owing and tendering that before 2 years have expired. Non-homestead usually has only 6 months to redeem. Costs of redemption can be calculated by adding the statutory 24% to repairs and improvements plus costs of legal actions.
Once the redemption period has expired, the property title is not clouded by redemption any longer, and title insurance can be obtained.