Urdu was the language of all educated people, whether Hindu, Muslim, or Sikh in large parts of urban India upto 1947. The common man in urban India spoke khariboli or Hindustani, of which Urdu was a polished, Persianized form, used by the educated elite ( see my article ' What is Urdu ?' on my blog justicekatju.blogspot.in ).
Hindi was an artificially created language, in pursuance of the British divide and rule policy, which said that Hindi is the language of Hindus, and Urdu of Muslims. The earlier ' Hindi ' literature was really literature of rural dialects like Avadhi, Brijbhasha, Bhojpuri etc.
Hindi was artificially created by deliberately removing Persian and Arabic words which had become of common use, and replacing them by Sanskrit words which were not in common use, e.g. the word 'zila' or district, was replaced by 'janpad'.
Once when I was a Judge of Allahabad High Court a lawyer who always argued in Hindi appeared before me with a petition titled ' pratibhu avedan patra '. I asked him what the word 'pratibhu' meant. He said it meant a bail application. I then said that he should have used the word 'bail' or 'zamanat' which everybody understands, rather than the word ' pratibhu ' which no one understands.
Hindi was thus artificially created by this hatred for Persian or Arabic words, even those words which had passed into common usage, replacing them with words which were not in common usage.
It may be mentioned that there is a misconception that a language becomes weaker if it borrows words from another language. In fact it becomes stronger, e.g. English, which borrowed from many languages and became stronger.
The great Persian poet Firdausi who wrote his epic Persian poem the 'Shahnama' had one big defect. He was a strong nationalist, and he bitterly resented the fact that Persia had been conquered by the Arabs. So he tried to remove all Arabic words in his epic Persian poem, even those which had passed into common usage. Of course his attempt failed.
It may be mentioned that the language of the common man in much of India is Hindustani ( or khariboli ), not Hindi. Hindustani is simple Hindi. In Hindustani we say " udhar dekhiye ". In Hindi we say " udhar avlokan keejiye ", or " udhar drishtipaat keejiye ". No one uses 'avlokan' or 'drishtipaat' in common language. It is an artificially created expression.