If four of the purple turtles turned green, I would have g+4 green turtles and p−4 purple turtles. If then half the green turtles turned purple, I would have (g+4)/2 = g/2+2 green turtles and p−4+([g+4]/2) = p+g/2−2 purple turtles.
By the same token, if four of the green turtles turned purple and then half the purple turtles turned green, I would have p/2+2 purple turtles and g+p/2−2 green turtles.
According to the statement of the puzzle, I would have twice as many purple turtles the first way as the second way. That is,
|p + g/2 − 2||=||2(p/2 + 2)|
|p + g/2 − 2||=||p + 4|
So I have 12 green turtles and an unknown number of purple turtles!