I live in a tri-level home. I am on the bottom floor and trying to run a cable from the wall up into the ceiling of the lower floor to put lights into this room. The way that it is currently done is not okay. Looking at my picture, the cable comes up and then it runs horizontally into the open space in the steel I-beam. It then hits a junction box (guessing the cable was too short) and then further down it runs up into the ceiling basically on the face of the stud. The drywall on the wall was notched to allow clearance for the cable. I know that is no okay, which is why I am trying to move it.
The beam runs the whole length of the wall, so I cannot just go further down to go up into the ceiling. And it is my understanding that I cannot drill a hole through the top flange of the beam.
So I think my only option (and not even sure if it is an option) is to go through the wood that is to the left and above the beam. Instead of the cable that is circled in red going through that stud, I need it to go up and come out above the wall where I have the purple circle. Not sure what is okay to drill through since there is so much going on here.
In short, how do I get a cable from red circle to purple circle without compromising the structure of the floor above or the stairs?
Edit to add picture where existing cable goes into ceiling on the surface of the studs.