A boy looks up to see a bellbird perched on the top of a 20-meter-tall building. If the angle of observation is 30°, the ground is flat and horizontal and the height of the child is also considered negligible, the distance of the child from the building is:

After you make your sketch you will see that your problem fits the standard situation so that

tan 30° = 20/x, where x is the distance to the wall
x = 20/tan30 = appr 34.6 metres

we could have done:
cot30° = x/20
x = 20cot30 and get the same result

or, recognizing the ration of sides of the 30-60-90 triangle as
1 : √3 : 2

we could say x/20 = √3/1
x = 20√3 = appr 34.6