He was using an isosceles right triangle.
Both legs of an isosceles triangle are the same length, so knowing that when the shadow of the triangle was the same height as the triangle, then he knew that the shadow of an object would also be the same as it's height.