Yes it will work, though probably not with the best bandwidth.
I'm not familiar with the radio shack switches particularly, but i suspect they're pretty cheap and the video portion probably isn't super high bandwidth which may be a concern. The audio side may or may not be just the same thing, hard to say. If this is a critical application, I'd recommend a switch whose performance you can ascertain and is appropriate, if it's not hugely important to you though it will probably be just fine.
I suggest you do put the Y' signal on the video part of the switch, and the chroma (PbPr) signals on the two audio connections, just in case the audio circuit is different and inferior. Likely they're all the same though, and probably not really 75ohm or high bandwidth anyway, but again you may not really see a difference.