h=2+1y, or h=2+y where h is the final height, 2 is the original height, and 1y, or y, is the rate of feet per year.
h=6+1/2y, or h=6+0.5y, where h is the final height, 6 is the original height, and 1/2 y, or 0.5y, is the rate of feet per year.
Now, we plug in heights to try and find a number of years that they will be the same height.
Let's start with 12 feet.
12=2+1y
12=2+y
12-2=y
10=y
12=6+0.5y
12-6=0.5y
6=0.5y
12=y
We seem to be fairly close, so we'll try something a little larger, 18 feet.
18=2+y
18-2=y
16=y
18=6+0.5y
18-6=0.5y
12=0.5y
24=y
This seems to be much farther away, so we'll try a smaller number, 10 feet.
10=2+y
10-2=y
8=y
10=6+0.5y
10-6=0.5y
4=0.5y
8=y
The years are the same now, so we know that in 8 years, the trees will be the same height. We also know that they both will be 10 feet height tall.