A gardener is planting two types of trees: type A is 5 feet tall and grows at a rate of 18 inches per year. Type B is 8 feet tall and grows at a rate of 14 inches per year. Algebraically determine exactly how many years it will take for these trees to be the same height.