You are going to want to use something like this.
https://www.amazon.com/Antenna-Switch-Amateur-Two-Way-Radios/dp/B00478M6QC
Not this one exactly but it gives you an idea of what you are looking for. Transmitting as you have described will cause damage to the radios.