Well, personally I'd take the job with two days a week in the office and the larger salary - but I'm speaking as someone with no kids, so I don't have to worry about childcare or getting home to collect a child from nursery or whatever. I also have very easy access to good public transport and don't really have any problem with sitting on a train for 45 (or 90) minutes twice a week with a good book. I'm sure for someone who had to factor in childcare or for whom the commute was a really complicated or stressful one, the WFH job might be the better deal.
Obviously it also depends how much you need the money and what the extra salary would mean to you. For some people the extra money might be a real lifeline in terms of paying off a debt or being able to have a holiday for the first time in years or whatever whereas for others, it might not make a massive difference.