Here is a picture to illustrate Failure's neat solution. Start by drawing the green square (this is a small square with its base on the base of the triangle and its top left corner somewhere on the left side of the triangle – it doesn't matter where). Then draw the dashed line from the left corner of the triangle to the top right corner of the green square. From the point where this line crosses the right side of the triangle, draw horizontal and vertical lines, as shown in red. You should be able to see (using similar triangles) that the red lines form a square on the base of the triangle, with its top vertices on the other two sides of the triangle, as required.