You did not specify any lines in your code. So I changed the last two lines in your code into plot statements and picked one of those plots to apply the dynamic color.
FYI, there are tons of examples of this already in the forum. Please spend some time searching and learning before posting such a simple request. (most of the easy questions have already been posted and solved).
input lengthOne = 9;
input lengthTwo = 9;
input maTypeOne = AverageType.EXPONENTIAL;
input maTypeTwo = AverageType.SIMPLE;
input priceOne = close;
input priceTwo = close;
plot maOne = MovingAverage(maTypeOne, priceOne, lengthOne);
plot maTwo = MovingAverage(maTypeTwo, priceTwo, lengthTwo);
maOne.AssignValueColor(if maOne > maTwo then Color.CYAN else Color.MAGENTA);