as far as I know urdu became a "muslim language" beacuse it was the first Indian language the Koran was translated to, even though it had existed for ages. Urdu was at the startingpiont only a written language and not spoken, until the "muslimasation" of the language, and it approached languages as persian, arabic etc.
But is was also a official written language in india in the last period of english rule.
regarding spoken language, as earlier said, pure hindi and todays pure urdu are quite different languages.
But since both languages were used in the areas around Delhi, they borrowed words from each other so one easier could understand eachother.
the devanagri (hindi) alphabet does not have the sounds f, z and q.
they have later been made by addig dots beneath the most similar sounding characters. this implies that ALL hindi words that has the sounds of f, z and q are borrowed words.when one speaks hindi today, app. 30% of the words are borrowed.
Indias previous PM Vajpaye spoke quite pure hindi, which made (my guess) more then 70% of the public not understand what he said!
the hindi most peolple talk today is a mix of the languages hindi, urdu, punjabi, gujrati, marthi (and many other Indian languages) and english, and is also called hindustani instead of hindi, which I regard as a more correct name of the language...
so next time you try to speak in hindi try to change the "borrowed" words and you will probably be standing there with a bilingualk dictionary and looking for words.
hope this clearified some questions