Is leaving the US for a couple of days enough to get another 3 months in the country?
Just leaving (US and adjacent islands etc) is sufficient to 'start again' as the US sets no fixed minimum absence between visits under the VWP.
There is no set requirement for how long you must wait between visits.
However the same site also cautions:
there should be a reasonable amount of time between visits so that the CBP Officer does not think you are trying to live here
So the answer to your question is quite likely "No" since 180 day residence out of 181 or 182 days looks like trying to live in USA. Apparently CBP have indicated that, as a rule of thumb after a 90 day visit they would be looking very closely at reasons for any return within 91 days.
However, you mention that your intention is only to extend your visit by 2 or 3 weeks. That is quite different. I have already answered US tourist visa - re-entry after three days possible for conference? with an opinion that that is achievable. Your situation is not quite as likely to be accepted, but nevertheless would very likely be. There is first hand experience from @brhans, where the chances were less likely (IMO), in a Comment:
My wife did this twice before we were married and got her proper visa. We spent a few days in Costa Rica before returning to the USA. Both times she was readmitted without any trouble for another 90 days. Why Costa Rica? Because it was the closest country which is just far enough to trigger the VWP reset YMMV
I recently came back to the US and was only issued 2 months this time, due to previously staying 6 months already.
from re-entry to US from mexico after time frame of current B2 visa.
@Michael Hampton has cautioned in a Comment:
Going to secondary is almost guaranteed. Getting in is not.
Since the decision rests with CBP no guarantee of entry is possible. I have no idea of the probability of 'secondary' but even being questioned closely need not be something to fear, from what you have written. I suspect when reapplying you will have a ticket for your departure proposed for 2 or 3 weeks later and as long as you are convincing about not intending to reside in the USA the odds (as indicated in my linked A) seem very much in your favour.
See also this answer and bear in mind in particular the advice about documentation. If you are in USA to see sights I would imagine "I want to visit X,Y,Z (East Coast) because in the first 90 days I saw A,B,C,D,E,F,G (West Coast) and did not have time for everything" would go down better than "I enjoyed my 90 days now want 20 more".