Least common multiple of $4$ and $2$ is $4$. Convert $-\frac{1}{4}$ and $\frac{1}{2}$ to fractions with denominator $4$.
$$\frac{3x}{8}-\frac{1}{4}-\frac{2}{4}$$
Since $-\frac{1}{4}$ and $\frac{2}{4}$ have the same denominator, subtract them by subtracting their numerators.
$$\frac{3x}{8}+\frac{-1-2}{4}$$
Subtract $2$ from $-1$ to get $-3$.
$$\frac{3x}{8}-\frac{3}{4}$$
To add or subtract expressions, expand them to make their denominators the same. Least common multiple of $8$ and $4$ is $8$. Multiply $\frac{3}{4}$ times $\frac{2}{2}$.
$$\frac{3x}{8}-\frac{3\times 2}{8}$$
Since $\frac{3x}{8}$ and $\frac{3\times 2}{8}$ have the same denominator, subtract them by subtracting their numerators.