ok to put these two water heaters on a sub-panel?
Go ahead and put both loads on the same subpanel -- you don't need a relay for this, as the tankless heater isn't a continuous load (i.e. I can think of no situation where the domestic hot water should be running in a house for 3 hours straight!).

(The feeder calculations are as per 215.2(A)(1)(a) -- 125% of the 4500W storage heater is 5625W + the 5700W tankless heater yields 11325W, which is 47A@240VAC.)