I believe you have to have the tab bar displayed to do this.
cmd+shift+t toggles the display of the tab bar. You will then have a tab for the window which you can drag out to the tab bar of the other window.
If you wanted just to merge all your windows into one there is an option in "Window - Merge all Windows"