Given, equation of line is $y=m x$ and bounded by $x=1, x=2$ and $x$ -axis
$\therefore $ Required area $=\int\limits_{1}^{2} m x dx$
$\Rightarrow 6=m\left[\frac{x^{2}}{2}\right]_{1}^{2}$
$\Rightarrow 6= m\left(\frac{4}{2}-\frac{1}{2}\right)$
$\Rightarrow 6=m \times \frac{3}{2}$
$\Rightarrow m=4$