Please will you show us what you've already tried, because it's not clear where you're stuck?
The best advice is to change the design - there's no way you should be mixing those two data sets in one table. But if you're stuck with it, surely you just insert into Destination B all the rows where sta_id is Y, and into Destination A everything else?
John