Explanation:
in an isoceles triangle (both legs have identical length) the height from the top corner to the baseline shots the baseline into 2 identical halves.
so,
6x + 6 = 9x - 15
6 = 3x - 15
21 = 3x
x = 21/3 = 7
many greetings to your teacher from me : he/ she made a formal mistake. the angles at Y have to be indicated as right angles. because if the line WY is not the height but could have any angle with the baseline, this cannot be solved.