To start, see the Google search API (deprecated, but maybe there is a new API, search on Google !). It deals with JSon Objects and JSon is native in AS3 now.
Then, you have to learn some AS3 code like dispatching a click event for a button and get the text from the input (basic, see the doc at MouseEvent), send the query to the Google API and get the result.
Look step by step.
Good luck !