I don't think that's possible in pure clientside javascript. You can't trick server B to see a third party PC as being server A. The only thing you can do is to put a "proxy" like feature on server A to access server B on behalf of the PC. So you either need to install and configure a genuine proxy or you need to write a small server side application for that. Of course, you can use javascript on server side too: see
NodeJS[
^].