I am not certain of what is provided by the auxiliary output, or the 5V input either.
My expectation is the 24V is a "notification output" intended to operate flashing lights, siren, relay etc when a fire condition is detected. It may be able to supply a couple of amps at 24V and becomes active when a fire condition exists..
The 5V input on the USB port - it may be a digital or analogue input port with 0V and 5V logic levels.
Some solutions:
The first 2 of these solutions provide 0V when the 24 is not present, and 5V at the input when 24V output is present.
A relay on the 24V output with a contact closure to signal the logic input. There may be a pullup resistor on board, or you need to provide one connected to the +5V in the USB device somewhere. The normally closed contact holds the input voltage down to zero, and when the 24V operates the relay the contact opens, allowing the pullup resistor (a few K ohms) to pull the input voltage up to 5V. This is a preferred method because it isolates the two system grounds and power supplies. The pullup connection is +5V through a resistor a few thousand ohms to the relay normally closed contac. The other side of the contact is to the USB device common (0V). The junction of the relay contact and the resitor is the 5V signal for the input.
A voltage divider. A 39K resistor connected to the 24V in series with a 10K resistor connected to ground/common, with the junction being the 5V signal. This divides by 4.9 so the 24V becomes 4.89V, close enough. Variations on this would use a small 5V three terminal regulator instead, or a 10K resistor in series with a 4.7V zener diode across the 5V input. Check the operation with a voltmeter before connecting to the input..
An opto-isolator could be used to provide isolation, in the same way as a relay. The photo diode is driven by a 4.7K resistor in series with the 24V signal, so that about 5 mA flows when 24V is present. The transistor side needs a few kilohms collector pullup resistor to 5V, and the emitter is connected to ground. The collector will be a 0V signal when the 24V is active. This system pulls down when the 24V is active, because that turns the transistor on.. It will be 5V when 24V is off.