We queried something similar while trying to trade up some years ago, in our case it fell through.
Our solicitor advised; of course it can be done, but we would be buying and selling as would the other couple, so usual legal fees and expenses etc. would apply to both parties.
The relevant Stamp duty would also apply to both purchases at market value of each house.
So no savings there.
We would have to discharge our current mortgage in full, and then take a new mortgage for the higher amount on the new property, obviously we would have needed our banks approval for this.
Bearing the above in mind, if they have what you want, and you have what they want, and purchase prices for both can be agreed, then both parties could achieve their objective, to sell and buy, it might be worth looking into further.