If for $a,b,x \in \mathbb{N}$ if we have $$a \mid x, b \mid x$$ prove that $\operatorname{lcm} (a,b) \leq x$
My solution: maximum value of $a,b$ is when they are both $x$, in which case their lcm is also $x$, but if any of them are less than $x$ then their lcm can't get bigger, hence their lcm is always less than $x$. Is this correct?
This doesn't make sense, because your $a,b, x$ are some fixed integers. If let $c=$max$(a,b)$, then $c$ is also a fixed number, so it is either $c< x, c=x$ or $c> x$. You cannot treat them as to first fix $x$ and then let $a, b$ vary and compare with your previously fixed $x$.
The least common multiple is $L=lcm(a, b)=a_1gb_1$, where $a=ga_1, b=gb_1,$ and $\gcd(a_1, b_1)=1$.
If $a|x$, then we have $x=ka, k\in\mathbb{N}^+$, then it gives $x=kga_1.$ If $b|x$, then we have $gb_1|kga_1\Rightarrow b_1|ka_1$, since $\gcd(a_1, b_1)=1$, it means $b_1|k$, so we have $k=tb_1, t\in \mathbb{N}^+$,
$$x=kga_1=tb_1ga_1=tL\Rightarrow x\ge L$$