Rita = r = 18 cm speed = 2 cm/m
Mariana = m = 12 cm speed = 3 cm/m
Equations
18 + 2l = 0
12 + 3l = 0
System of equation
18 + 2l = 12 + 3l
18 - 12 = 3l - 2l
6 = l
Time = 6 months
Length Rita's hair length = 18 + 2(6)
= 18 + 12
= 30 cm
Mariana's hair length = 12 + 3(6)
= 12 + 18
= 30 cm
Conclusion: It will take 6 months to Mariana and Rita to have the same length of their hair, it will be 30 cm.