To find the distance from the bottom of the building to the point where the ladder is touching the building (let's call it \( h \) for triangle 2), we'll use the properties of similar triangles.
Given Triangle 1:
- Distance along the ground (base) = 18 feet
- Distance up the building (height) = 27 feet
For Triangle 2:
- Distance along the ground (base) = 10 feet
- Distance up the building (height) = \( h \) (unknown)
Since the triangles are similar, the ratios of corresponding sides are equal:
\[ \frac{\text{Base of Triangle 1}}{\text{Base of Triangle 2}} = \frac{\text{Height of Triangle 1}}{\text{Height of Triangle 2}} \]
Plugging in the values we have:
\[ \frac{18}{10} = \frac{27}{h} \]
Cross multiplying gives:
\[ 18h = 27 \cdot 10 \]
Calculating the right side:
\[ 18h = 270 \]
Now, solve for \( h \):
\[ h = \frac{270}{18} = 15 \]
Thus, the distance from the bottom of the building to the point where the ladder is touching the building for triangle 2 is:
\[ \boxed{15 \text{ feet}} \]