We start with the equation:
\[
\frac{2}{5} = \frac{x}{18}
\]
Using cross-multiplication, we have:
\[
2 \cdot 18 = 5 \cdot x
\]
Calculating the left side:
\[
36 = 5x
\]
To isolate \( x \), we divide both sides by 5:
\[
x = \frac{36}{5} = 7.2
\]
Next, we consider the equation:
\[
\frac{5}{6} = \frac{-35}{x}
\]
Again, we use cross-multiplication:
\[
5x = 6 \cdot (-35)
\]
Calculating the right side:
\[
5x = -210
\]
To isolate \( x \), we divide both sides by 5:
\[
x = \frac{-210}{5} = -42.0
\]
The solutions are:
- For part a: \( \boxed{x = 7.2} \)
- For part b: \( \boxed{x = -42.0} \)