When Rahul moved into a new house, he planted two trees in his backyard. At the time of planting, Tree A was 32 inches tall and Tree B was 20 inches tall. Each year thereafter, Tree A grew by 6 inches per year and Tree B grew by 9 inches per year. Let AA represent the height of Tree A tt years after being planted and let BB represent the height of Tree B tt years after being planted. Write an equation for each situation, in terms of t, commat, and determine the number of years after the trees were planted when both trees have an equal height.

For Tree A, the equation is:

AA = 32 + 6t

For Tree B, the equation is:
BB = 20 + 9t

To find the number of years when both trees have an equal height, we set AA equal to BB:
32 + 6t = 20 + 9t

Simplifying the equation:
32 - 20 = 9t - 6t
12 = 3t

Dividing both sides of the equation by 3:
t = 4

Therefore, both trees will have an equal height 4 years after they were planted.