I don't know if I got it but I'll try: the way you placed the "cone light" respect to the "box cage", makes me guess that the "box front face" should be totally transparent, a sort of "window"...?
If so, the cone hits the sides of that "window", thus the exiting shape is limited by that (it will be straight), while the upper part of the cone is not hitting the box limit, so it will exit the box keeping its shape...
something like this? (the side part of the cone are straight)
here below I tried to use colors to explain better
- the box is red
- the cone part that exits the cube "untouched", without interfering with the window shape is blue
- the cone part that exits the cube "cut", due to the window shape is yellow
I'll provide steps to reproduce if it is what you want (you'll need one boolean and scaling the "intersect" respect to the origin point)
Here are very detailed steps (it could seem somewhat too much, but since you're a beginner...)
we start with the two shapes (note the box has a "closed window", needed for the upcoming boolean modifier)
then we select the cone and insert a boolean modifer
with the cube as target and mode "intersect" (previously I wrote "difference", wrong)
as soon as you confirm, the cone shape is "cut" to the part that intersects the cube
now you'll need to "apply" this modifier (makes this "cut" permanent)
and you're left with this shape
seeing it within the cube wireframe confirms that it's been perfectly cut.
Note: I already palced the 3D cursor to this vertex (cone origin), and set pivot transform mode to "3D cursor". This will come handy later.
now we need to switch to face mode select and delete this face (only faces)
then you need to switch to vertex select mode and select this "ring" of vertices
now, a strange move: we need to start an "extrude" of these selected vertices, but nothing more, so press E, then immediately ESC or RMB) to stop the extrusion, leaving the extruded new vertices where they started from. WHy we need those new vertices to be exactly where the previous were, but independent, to be able to generate a new shape later...
then, you immediately start a scale operation with S: since you set the pivot transfor mode to 3D cursor, and the 3D cursor is at cone origin, the scale of those "extruded" vertices is made respect to the 3D cursor... which makes them follow the intended "projection" direction
and stop it, confirming, when you wish...
This leaves the part of the cone that is inside the box untouched, while the part exiting the cone "cut" by the box shape
You may finally want to remove the "window" face, and get the final result:
That's it: it's been a bit long, but hopefully easy to follow... ;)