Is applying a linear operation to the input and output of a continuous linear operator OK?
To be a bit picky, the claim does not hold for all linear systems. Here's a counter-example:

Let the system $Tr$ be defined by the input-output relation $$y[n]=Tr\{x[n]\}=nx[n].$$
This system is clearly linear, since

$$Tr\{ax_1[n]+bx_2[n]\}=n(ax_1[n]+bx_2[n])=aTr\{x_1[n]\}+bTr\{x_2[n]\}$$

Now, let's apply the following linear operation $H$ to an input signal: $y[n]=H\{x[n]\}=x[n-1]$. This operation is also linear. Let's see what happens to the claim:

$$Tr\{H\{x[n]\}\}=nx[n-1]\neq H\{Tr\{x[n]\}=(n-1)x[n-1].$$

So, in general the claim does not hold for a linear system. 

However: Assuming the claim is stated for linear time-invariant systems (LTI), then it is correct. (The claim was missing the constraint of time-invariance). The proof is simple: Any LTI system is described by its impulse response, and the output of a system is the convolution of the input signal with its impulse response. Given a system $L$ with impulse response $l[n]$, and a system $M$ with impulse response $m[n]$, we get

$$g=L\{f\}=l*f$$
$$M\{g\}=m*g = L\{M\{f\}\}=l*m*f=m*l*f=M\{L\{f\}\}$$

The reason why this is true is the commutativity of the convolution operation (i.e. $x*y=y*x$). Since the commutativity holds for both discrete and continuous time, the claim holds for both discrete and continuous time.