The form in the web page includes both captcha fields (say, a1, a2) and your own fields (say, b1, b2). The PHP script retrieves the variables by $_POST['a1'], etc.
Firstly, determine whether the user answered the captcha correctly by checking a1, a2. If it is no good, display the form again with new captcha question. If the answer is fine, go ahead to process b1, b2 as normal.
BTW, have you tried to search for ready-made captcha classes in PEAR? Why bother to reinvent the wheel? 😕