Bank Foreclosed homes

I’m active military and currently live on base in military barracks. I want to become an RE investor using bank foreclosed homes. Correct me if I’m wrong. I want to get a pre-qualified home loan and use it to purchase a bank foreclosed home at a discounted price with immediate equity. My goal is to do a quick sell at appraised value or lease with option to buy. If I can’t find a buyer or tenant I can use my military BAH (basic allowance for housing) until I do. I would like to achieve this with in a 30-45 day time frame. Please respond soon.