Hi Yuqing, I would look at it from a rent vs. own perspective. If you are targeting these areas with a roommate for a 2 bed, your share will be $3.5k / 2 = $1.75k or $1.16k if there's 3 of you per month in rent give or take depending on your agreement.
If you are owning, you might be able to fill another individual in there as you mentioned if there's room. But if you can work to find a property that fits your criteria with an out of pocket payment around that $1.75k per month or even if it's a bit higher thats still a win.
As a hypothetical: if your total mortgage, interest, taxes ends up being $4.5k per month and you can have each person paying $1,200 then your personal portion is $2,100. I'd still take this higher payment over paying 100% rent to someone else.
Of course, we don't know your full financial picture - income, assets, etc. to make a personalized decision so speaking with a lender, financial advisor, real estate agent would certainly help.