Side of the largest possible cube inside a cone? Question:

What is the side of the largest possible cube inside a cone of height $12$ units and radius $3\sqrt 2$ units?

Now, when this question came up (in my class), I instantly thought to myself that $1^{st}$ I must check how the cube must be placed. With the limited time I had, I drew the following cases:

I reasoned to myself that any intermediate variations must ultimately settle at these $2$ supposedly extremities. Let the figure on the right be called $R$ and that on left, $L$. Then by looking at the diagram itself, I concluded that since $R$ makes better use of the extended width of the cone down below, so it must be the largest possible cube that one may fit inside the cone.
But my teacher directly proceeded with $L$ and no one else minded it so I questioned, to which, I was told by teacher that $L$ IS better. Thus, here. Please help.

Finally, using similar triangles and the common vertex angle in $L$, we arrived at $4$cm for the side of the cube (in $L$).

I think your teacher is right, though it's very disappointing that he/she didn't seem to take your question seriously.  First thing to note is that your right-hand diagram is not accurate.  If you stand a cube upright on one of its corners (I am assuming that's what you meant), the profile will be a hexagon, not a square.  One corner will be on the base of the cone.  Three corners will be at height $s/\sqrt3$, where $s$ is the side of the cube, and will lie on a circle with radius $s\sqrt{2/3}$.  Three more will be at height $2s/\sqrt3$ and will lie on a circle with the same radius.  The top corner will be at height $s\sqrt3$ above the base.
By similar triangles, the radius of the cone at height $h$ is given by
$$r=3\sqrt2\Bigl(1-\frac{h}{12}\Bigr)\ ,$$
and the second condition above means that for the cube to fit inside the cone we need
$$3\sqrt2\Bigl(1-\frac{s}{6\sqrt3}\Bigr)\ge s\sqrt{\frac23}\ .$$
Solving gives $s\le2\sqrt3$ which is less than $4$, so the cube in the left-hand diagram is bigger.
If you meant the cube to be standing on an edge then the profile is a square as in your diagram (or a pair of rectangles if you look from a different angle).  In this case four vertices form a rectangle with circumradius $s\sqrt3/2$ at height $s/\sqrt2$.  Using the same idea as above gives
$$s\le\frac{12\sqrt2}{1+2\sqrt3}\ ,$$
which is actually bigger than before, but still less than $4$.
