I disconnected my basement light wire by accident. In my spare room upstairs I had no light. I had this wall switch which controlled the receptacle instead. I decided to install a ceiling light using the same switch. I removed the receptacle and cut the wire not realizing that the wire was attached to the basement wire as well. Source wire was coming down from the ceiling which was attached to the basement wire as well as the receptacle. I pulled the source wire back up from the ceiling and installed the light using the switch loop configuration down below. Spare room light works great.
Now I have the basement wire sticking out of the receptacle hole. Below are the pictures. My question is how do I attach the basement light wire back to the same source? Should I install a junction box in the ceiling and throw a wire from the ceiling to extend the current basement wire?