How to search both Users and Nodes simultaneously in drupal 7
As AyeshK noted in the comments, you can't get this functionality with Drupal core (or even Views).

There are a couple of modules you can try though:


Search API multi-index (relies on Search API)


  This module is an addition to the Search API module which allows users to search on several indexes at once.
  
  When the module is enabled, you'll get a new Views base table where you can search all enabled Search API indexes at once. Performance might suffer, though, if not all indexes lie on the same Solr server (or other backend server that supports this feature).
  
  Please note that, since multi-index searches aren't supported explicitly by the Search API, most other Search API add-on functionality (facets, autocomplete, saved searches, search pages, etc.) won't work with searches created with this module.

Entity Backend Search (in alpha)


  This module enables highly customizable search pages for any entity type on a site for the editorial staff. It does not require any modules outside Drupal Core and is very easy to configure.