HSTS doesn't have anything to do with the specific host that the content is being served from, or where the SSL termination is being done.
HSTS by itself also doesn't say anything about certificate pinning or similar, so as long as you are using only HTTPS with HSTS, which specific certificate you are serving is largely immaterial.
What you should do is to simply ensure that both servers serve valid certificates with a proper trust chain and have otherwise correct HTTPS configurations.
You can edit your hosts file or similar in order to test this using contemporary web browsers before going live, or you can use more specialized tools like OpenSSL's -connect
option to verify which certificate is being served.