The ratio of corresponding sides DN and KI is 12 : 4 = 3 : 1. The same ratio applies to altitudes DQ and KO. Since the difference between these altitudes is 6 and the difference between their ratio units is 3-1 = 2, each ratio unit must stand for 6/2 = 3 units of linear measure. That is, ...
DQ = (3 units)·3 = 9 units
KO = (3 units)·1 = 3 units
Then the base lengths QN and OI can be found from the Pythagorean theorem: