How to populate search form with search term in View / Panels / Page?
Looks like from that link that the search form is the search block form, so you can do this as a theme form alter (you could also make a custom module in a similar fashion with form alters but this should serve your needs).  This goes in your template.php for your theme:

function YOURTHEMENAME_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  switch ($form_id) {
    case 'search_block_form':
      //checking if arg(2) exists so it doesn't try to do this if some visits the search page straight away
      if(arg(2)){ 
        $form['search_block_form']['#default_value'] = arg(2);
      }
      break; 
  }
}