Open app in another tab

I use menu that opens apps in tabs.
When I have app “A” opened and then I open app “B”, when closing app “B” I need to close tab for app “B” and reload app “A”.
Any idea/suggestion?