How does the focus return to program A after finishing prog B ?
B must do a redirect back to application A.
Was of the opinion that the focus (after finishing B) automatically returned to A. Does this require some additional code in A or in B ?
Yes, you must write code. It sounds like you should probably learn what a redirect is and maybe HTTP GET and POST.
302 Found
HTTP Request Methods
The Response.Redirect returns a 302 (or 301) HTTP response where the location header is set to a target URL. When the browser receives the HTTP response it does an HTTP GET to the target URL found in the location header. This is similar to clicking a link.