I accidentally dragged the timeline, and now it covers the entire screen. how do i put it back?
You can just change the Editor Type.
Or, if you want more editors side by side, drag the tiny corner to split the area.

Change the editor type or split the area.