Yes maybe from a grammatical point of view, I am not even sure. But this looks much more like a question from a math problem (a math problem in maybe 9th or 10th grade top) and as such should be solved as a math problem. And the answer from chatGPT is not illogic as a math answer