How does this fire alarm system transmit data on two-wire?
What protocol is used is impossible to say unless I have access to the technical documentation of the units and/or can reverse-engineer them.

We can assume that it is some kind of communication protocol suitable for one shared connection (no separate TX, RX, clock etc. but one bidirectional signal).

With some electronics it is possible to make data and power share the same pair of wires. This is nothing new, the old wired telephone system already used it!

Here are some links that show how this can be done:

Transmit Digital Signals and Power Over Same Wires

Using SN65HVD96 to Create a Power-Over-Data and Polarity Immunity Solution

The basic idea is that the power is DC and the data is AC. With some electronics (that can be as simple as an RC filter or a transformer) the two (data, power) can be combined and separated in each device.