Wiring new ceiling fan with only one hot wire and a remote
It sounds like you have two switches feeding two switched hots and you want to connect both of these to the fan supply wire.
This is probably safe and will result in either switch being able to turn on the fan.
There is a small chance that these wires are on a multi-wire branch circuit and the hots are on opposite 120 volt legs. In this case, doing that will cause a short circuit and hopefully trip the breakers.
I’d recommend, just for general principles, to use just one hot wire and cap the other.