pass the form data through to do.php on server B. Your code on server B just isn’t using them. They’re passed through in the $_POST array just like they are in the form submit.
Sorry, I don’t know what you mean by that. Show the code that you are having trouble with.
CURL captures the output from your server-B script if you have the RETURNTRANSFER option set, so normally you would echo responses on the remote script, and they’ll appear in $output. If you need more than one response, you can build an array and json-encode it.