There is a hotfix build, 10.5.1 Hotfix 13, that fixes the issue where the link to WebView does not work from Team Center when you specify a context path to WebView. You should raise a support request for this.
Default URLs would be:
Team Center http://<host>:<port>/<context>/ApmServer/
WebView http://<host>:<port>/<context>/#home;tr=0
The #home changes depending on the tab, #investigator for Investigator
The URL is not configurable beyond the context part but perhaps you could use a proxy such as nginx if you really need to modify the URLs in this way