This is a pictorial description of the proof in the sibling comment. It does not use calculus of variations, just the definition of the path length of a (differentiable parametrized) curve. If you want to call your parametrization a "light-ray" thats fine, but muddies the waters for me.
Just spell out what we mean by path, length of a path, and use calculus of a single variable. No need to introduce 'time', 'constant speed' or the like.
BTW, a truly variational proof is in the wikipedia article [0].
[0] https://en.wikipedia.org/wiki/Calculus_of_variations#Example