I am confused since the title for this post is "install Windows 7 in laptop having MS DOS" and in the post "How to install Windows 10 in hp laptop having MS DOS"
Depending on the model, it might be a choice, or either might be installed. Since the PC came with Free DOS, then you need to purchase the Windows 7 or Windows 10 install. Since the model is not posted, that is about all I can advise.