How long will it take before I can qualify for a mortgage or a car loan?

Generally, you are not disqualified from a federally guaranteed or insured mortgage after two years from your chapter 7 or chapter 13 discharge. There is a program that avoids disqualification while you are still in a chapter 13 case if you have timely made at least one year of payments and the bankruptcy court approves the proposed mortgage.
Generally, the same rules apply for non-federal mortgages.
I apologize for the “Generallys”. There are a whole bunch of things that mortgage lenders look at. You might be denied a mortgage despite the passage of the necessary two years.
Car loans are not as regulated as mortgages, and car lenders are not as picky. Each lender can be a different case. My experience is that car lenders only care about a bankruptcy for the first two years after the discharge, and even then the consequence is only a small increase of interest if you cannot wait the full two years.
Getting a car loan while still in an active chapter 13 bankruptcy case can be a problem. Most lenders will not cooperate, and the few which will expect higher interest – and there is no way to predict what that interest will be. You definitely will have to shop around and then get bankruptcy court approval. For this reason, I advise all my chapter 13 clients to get replacement car loans before the filing if there is reason to expect that the car will not last the 3-5 years of the bankruptcy case.
Payments made after a discharge will not appear in your credit report. Your new lender will not know of your payments. You should ask your existing mortgage or car lender for a payment history to show the new lender that you made timely payments.