You can think of the problem like two triangles that have the same angles but different dimensions.

For triangles like these the ratio of their hypotenuses is equal to the ratio of their heights (y). Likewise the ratio of their hypotenuses is equal to the ratio of their bases (x)