Commute or take a place
We rent the apartment, so this comparison is deliberately built to run against us. Weekend trips home are charged to the apartment side — nobody takes a room in another city and never goes back, and leaving that out is the easiest way to rig the answer. Commuting, meanwhile, pays nothing for accommodation. What an hour is worth to you is your number: time is the largest term here — 95 kilometres twice a day is 50 hours a month — and a figure we invented would decide the answer, in our favour. Leave it blank and time counts for nothing, so the apartment has to win on money alone. We also give the rent at which the two are equal, because that is something you can negotiate against; "the apartment is cheaper" is not. Tax stays out of it: whether any of this is deductible is a question for an accountant, and folding in an assumed rate would hide the arithmetic behind a guess.