Hi,
The clean solution is to use HikaMarket, setup two vendors, assigned the different products to different vendors, and set the "Limit vendors in cart" setting of HikaMarket to "one vendor".
That way, the customer won't be able to add to the cart a product from another vendor than the vendor of the products already in the cart.
Another solution is to use the weight or dimensions of your products to differentiate your products between different shipping methods using the min / max weight / volume so that when you have products from both types in the cart, no shipping method is available and thus it blocks the checkout.
With warehouses, I don't think you'll be able to achieve what you want.