I'm not sure what kind of answer you're expecting, exactly, but we can do some math. There are 107 day between now and August 31. If we put an upper limit at 8 hours per day, and assuming your performance is constant on each day, then we have 856 total hours in which to learn a new skill well enough to make money at it, get a job and make $4k total.
Right off the bat, we can ask how much money would you need to earn per hour to save $4k in 107 days. 4000/(107*8) = 4.67 dollars per hour. There's our bottom line.
But since you won't be a working developer for a while, we need to think about how long you'll have to account for learning and job searching. The basic front end cert is estimated to take about 800 hours, which is 100, 8 hour days. I happen to think that 800 hours is a little low for an estimate, but we'll assume you're an information sponge, unhindered by even biology or physics and you get the certificate, learning everything well enough to be employable, in 800 hours. That would leave you 7 hours to get a job and make $4k. Don't forget that we're here to do math, and that comes out to 4000/7 = 571.43 dollars per hour. Things aren't looking good here.
Let's be really optimistic. You're not going to dedicate 7, or even 8 hours per day to this. You're going to give it 16 hours each day, 5 days per week. Than, you could have the certificate in 800/16 = 50 days. You now have substantially more days in which to work, 57 to be exact. Now, in order to reach your goal, you only need to make 4000/57/8 = 8.77 dollars per hour. I don't think a developer should charge less than $24 per hour (about $49,000/year), so you could, theoretically, make the money, but you can't spend much time looking for work, and you'll have to account for taxes and other expenses.
There's another way to look at this. Solving the inequality 24 ≤ 4000/(X*8) tells us the number of days you'd have to work at $24 per hour in order to get your money: 21. 107 days less 21 is 86, which is how long you have to learn everything and get work. Recall that at 16 hours per day, you'd only need 50 days to complete the front end certificate, so 86 days means you can spend less time each day on it, and even allow yourself time to find work. Things are looking better!
But let's be realistic. You're talking about 800 hours of intense instruction, and then somehow getting enough freelance work to earn $4k, all in just over 4 months. It's possible, but is this likely? No.
Just do it, though. What do you have to lose by trying?