I think it's a reasonable comparison, yes, but not solely on monetary terms. Cost of living is certainly an important part of a decision on where to live, but it is not even close to the only consideration.
Put differently: the size of house you can buy is often low on the list of considerations.
We're comparing cost of living in two different states. That's a perfectly reasonable comparison to be able to make.