Find the set of values of $a$ for which the inequality $(x-3a)(x-3-a)<0$ is satisfied for all $x$ in the interval $1\le x\le3$.
$$(x-3a)(x-3-a)<0\implies a+3<x<3a$$ and we are given that $1\le x\le3$.
So $a+3>1$ and $3a<3$ ,so $a\in (-2,1)$ but the answer given is $a\in(0,\frac{1}{3})$.
The function $f(x):=(x-3a)(x-3-a)$ has two zeros $3a$ and $3+a$ which coincide at ${9\over2}$ when $a={3\over2}$. Note that both zeros move to the right when $a$ is increasing. Since the coefficient of $x^2$ in $f$ is positive the function is negative between the two zeros. As we want it to be negative in the $x$-interval $[1,3]$ we obtain the condition $$\min\{3a,3+a\}<1\qquad\wedge\qquad\max\{3a,3+a\}>3\ .\tag{1}$$ When $a\geq{3\over2}$ then both zeros are $\geq{9\over2}>3$, hence such values of $a$ are a priori forbidden. When $a<{3\over2}$ then $\min\{3a,3+a\}=3a$ and $\max\{3a,3+a\}=3+a$. The condition $(1)$ then translates into $$3a<1\qquad\wedge\qquad3+a>3\ ,$$ which is fulfilled iff $0<a<{1\over3}$.