1. They are a professor and a writer.

2. They are a professor and writer.
3. They are professors and writers.
4. He is a professor and writer.
5. He is a professor and a writer.
(Which expressions are not correct?)

They are all correct. However, the exact sentence depends upon your meaning.

What about #5? Doesn't 'a professor and a writer' mean two persons?

No. The professor also may be a writer.

The expressions that are not correct are:

2. They are a professor and writer.
Here, it is incorrect because "professor" and "writer" are two separate roles, and each role should be preceded by an article. Therefore, it should be "a professor" and "a writer."

4. He is a professor and writer.
Similarly, this expression is incorrect because "professor" and "writer" are two separate roles, and each role should be preceded by an article. Therefore, it should be "a professor" and "a writer."