Sharing a VHF aerial

Short answer. No !

Unless it is a proper co-axial switch, which are not cheap, you risk blowing up both the ais & the radio.

Far better to get a separate aerial for the AIS, mount it on the pushpit rail if nowhere else available.
 
A pullpit mounted AIS antenna should give more tha enough range. Keep the masthead for VH comms so no need to share. Plus of course if the stick falls down, you have a spare to swap to if you have the cables made up ready to go.
 
A pullpit mounted AIS antenna should give more tha enough range. Keep the masthead for VH comms so no need to share. Plus of course if the stick falls down, you have a spare to swap to if you have the cables made up ready to go.
+1, with some additional thoughts.

Make sure your cables are long enough that you can swap them between VHF/AIS without too much difficulty.

Also something that has just occurred to me based on what I was told about the performance of my deck-mounted AIS antenna. I often picked up ships at 12-15 miles range, but was told I wasn't picked up until much closer. My theory is that, because class A transmits so frequently, you have more chances to pick up a signal early, whereas class B transmits every 30 seconds or so. If you are in a trough during the transmission, you won't get seen, and only get another chance in another 30 seconds.
 
Top