Easiest is to use the ssh connection to servA to setup a tunnel:
ssh -L50022:servB:22 user@servA
You can then connect to the ssh daemon on servB by accessing localhost:50022, the conversation is forwarded or "tunneled" to servB:
ssh -p 50022 user@localhost
or
scp -P 50022 /some/local/file user@localhost:/home/user/
You can automate that by putting it in a script. But then you have to take care that the first call (to setup the tunnel) does not block the script:
ssh -T -L50022:servB:22 user@servA &
scp -P 50022 /some/local/file user@localhost:/home/user/