-
Unless there's something very weird going on, all three flats will be the same leasehold tenure. The two people who own two of the flats also coincidentally own half of the freehold each. Presumably they'd sell you that share at the same time they sell you their flat, but they don't have to.
You'd agree what maintenance needs doing with the other freeholder and then send a third of the bill to the other leaseholder. This isn't terribly different to if all three of you were freeholders.
You mean each flat has a separate leasehold and the freehold for the building is shared or each flat has its own separate freehold for half the building? The latter would be unusual.