How to store Ajax Return value into variable after clicking the Submit button
You need to move the $form['city'] form input creation into your form_test_form function otherwise it's considered tampering with the form, so the values will get taken out.

function form_test_form($form,&amp;$form_submit) {
  $form['state1']= array(
    '#type' =&gt; 'select',
    '#title' =&gt; t('State'),
    '#options' =&gt;$options_state,
    '#required' =&gt; TRUE,
    '#ajax' =&gt; array(
      'callback' =&gt; '_ajaxfunction',
      'wrapper' =&gt; 'divaroundseconddropdown'
    ),
  );

  $form['city_element_wrapper'] = array(
    '#prefix' =&gt; '&lt;div id="divaroundseconddropdown"&gt;',
    '#suffix' =&gt; '&lt;/div&gt;',
  );

  // If there's a "State" value set, then we create the City dropdown
  if (isset($form_state['values']['state1']) &amp;&amp; !empty($form_state['values']['state1'])) {
    $form['city_element_wrapper']['city'] = array(
      '#type' =&gt; 'select',
      '#title' =&gt; t('District'),
      '#options' =&gt; $options_city,
      '#required' =&gt; TRUE,
    );
  }

  return $form;
}


Now the callback becomes a simple return of the relevant element:

function _ajaxfunction($form, $form_state) {
  return $form['city_element_wrapper']; 
}


Finally check the values of $form_state['values'] in your submit handler:

function form_test_custom_form_submit($form, $form_state){
  var_dump($form_state['values']);
  die();
}