This is a simple matter of not understanding the chain rule, that’s all (it’s hard!).
When you say that the derivative of $\sin({3x})$ is $\cos(3x)$, that is actually true! - but only if you’re differentiating with respect to $3x$.
Observe:
$\frac{d}{dy}\sin(y) = \cos(y)$
Let $y=3x$. Then
$\frac{d}{d(3x)}\sin(3x) = \cos(3x)$
If you differentiate with respect to the thing you’re taking the $\sin$ of, you get $\cos$ of that thing; that is, when the variable in denominator of $\frac{d}{dy}$ (which is $y$ right here!) exactly matches the variable that the function $\sin(y)$ is of (also $y$ right here!), then the derivative is just as you calculated: $\cos(y)$.
But you’re NOT asked to differentiate with respect to $3x$; you’re asked to differentiate with respect to $x$! Since $x$ is NOT the thing we're taking $\sin$ of (it's $3x$!), the Chain Rule tells us that after we differentiate with respect to $3x$, we must multiply by the derivative of $3x$ with respect to $x$; that is, $3$.
Again, observe:
$\frac{d}{d\color{blue}{x}} \sin(\color{red}{3x}) = \frac{d}{d(\color{red}{3x})}\sin(\color{red}{3x}) \cdot \frac{d}{d\color{blue}{x}} (3\color{blue}{x})$
Since $\frac{d}{d(\color{red}{3x})}\sin(\color{red}{3x}) = \cos(\color{red}{3x})$, and $\frac{d}{d\color{blue}{x}}(3\color{blue}{x}) = 3$, then
$\frac{d}{dx} \sin(3x) = (\cos(3x)) \cdot 3$
Edit:
When I say "with respect to", technically what I mean is "how does this function change as this one variable changes". But you don't really need to fully wrap your head around that to be able to use the Chain Rule. Let's just say it means "the 'something' in $\frac{d}{d(something)}$".
For example, let's say we wanted to find the derivative of the function $ax^2$ with respect to $x$. That is, we want to calculate $\frac{d}{dx} ax^2$. That means that we will treat $x$ as the variable and $a$ as some constant (as if it were the number $3$). By the Power Rule, this would differentiate to $2ax$.
However, we could also make an assumption that $a$ is the variable in this function, and we want to find the derivative with respect to $a$. That is, we want to calculate $\frac{d}{da} ax^2$. (Notice $a$ is now the 'something' in $\frac{d}{d(something)}$). In this instance, we will treat $a$ as the variable and $x^2$ as some constant (as if it were the number $3$). Now this thing is just a constant times a variable, so it differentiates to the constant $x^2$.
Finally, let's consider what would happen if we treated the whole of $x^2$ as the variable (rather than just $x$), and we want to find the derivative of $ax^2$ with respect to $x^2$; i.e. to find $\frac{d}{d(x^2)} ax^2$. This means that we'll once again treat $a$ as constant, but now $x^2$ will be treated as the entire variable. To calculate this, we have a constant times a variable, which merely differentiates to a constant - meaning $\frac{d}{d(x^2)} ax^2 = a$.
Does this help?
Let's stick to continuous, differentiable functions. A real function $f$ is one-to-one if it is strictly monotonic (the function itself, not its derivaitve!!)
You can guarantee that a function is strictly monotonic if its derivative does not change sign (let's ignore zeros for now. I mean: it either stays positive, or stays negative). In your case, $f'(x)=2+\cos{(x)}$ is always greater than zero.
It could be the case that $f'$ has a zero and $f$ is still strictly monotonic (think of $f(x)=x^3$), but what cannot happen is that there are points where $f'$ is positive and other points where $f'$ is negative
Best Answer
To show that $f(x) = x^3 + 3 \sin x + 2 \cos x $ is one-to-one, it is enough to show that $ f'(x) = 3 x^2 + 3 \cos x - 2 \sin x > 0 $ for all $ x $. Notice that $ (3 \cos x - 2 \sin x) \ge -2 $ for all $ x $. So, whenever $ 3 x^2 > 2 $, $ f'(x) $ must be positive. Note that for $ x \le -\pi/2 $ or $ x \ge \pi/2 $, $ 3 x^2 \ge 3 (\pi/2)^2 > 3 (3/2)^2 > 2 $. Hence, $ f'(x) > 0 $ for $ x \le -\pi/2 $ or $ x \ge \pi/2 $. Next, for $ -\pi/2 < x < 0 $, all three terms in the expression of $f'(x)$ are positive, and so $f'(x)$ is also positive.
Finally, consider the case $ 0 \le x \le \pi/2 $. Two ways of establishing $f'(x) > 0$ is described below: one requires a calculator, the other does not.
Using calculator: Note that within $ 0 \le x \le \pi/2 $, $(3 \cos x - 2 \sin x) \le 0$ for $ \tan^{-1} (3/2) \le x \le \pi/2 $. Using a calculator (or your favorite application or programming language), verify that $3 (\tan^{-1} (3/2))^2 > 2$. Since $3 x^2 \ge 3 (\tan^{-1} (3/2))^2 > 2 $ for $ \tan^{-1} (3/2) \le x \le \pi/2 $, we have $ f'(x) > 0 $ for $ 0 \le x \le \pi/2 $.
Without using calculator: This method would not require any calculator, but only knowledge of the values of $\sin x$ and $\cos x$ for $x = (\pi/4), (\pi/3)$, which follows from basic geometry. Like before, it is sufficient to show that $ f'(x) > 0 $ for $ \tan^{-1} (3/2) \le x \le \pi/2 $. Since $\tan^{-1} x$ is a strictly increasing function in $ 0 \le x \le \pi/2 $, it follows that $ \pi/4 = \tan^{-1} 1 < \tan^{-1} (3/2) < \tan^{-1} \sqrt{3} = \pi/3 $. Note that $ 3 x^2 \ge 3 (\pi/3)^2 > 3 $ for $\pi/3 \le x \le \pi/2$, and hence $f'(x) > 0$ for $\pi/3 \le x \le \pi/2$. So, it is sufficient to show that $f'(x) > 0$ for $\pi/4 \le x \le \pi/3$ to complete the proof. Note that for $\pi/4 \le x \le \pi/3$, $3x^2$ is an increasing function, while $(3 \cos x - 2 \sin x)$ is a decreasing function. Therefore, for $\pi/4 \le x \le \pi/3$, $f'(x) \ge$ $ 3 (\pi/4)^2 + (3 \cos (\pi/3) - 2 \sin (\pi/3))$ $> 3 (3/4)^2 + ((3/2) - \sqrt{3}) = (51/16) - \sqrt{3} > 3 - \sqrt{3} > 0$.