Caveat: According to 2020 NEC, switch boxes in many living areas must have a neutral wire available in the box. Your box B does not (it only has hot and the traveler wires), but may be grandfathered in.
The online manual for this unit shows two sample wiring options:
From this, we can determine that the fan unit wires are as follows:
White - neutral (unswitched)
Ground - ground (unswitched)
Brown - auto humidity control (connect to hot to activate)
Grey - fan override (connect to hot to force fan on)
Black - LED light (connect to hot to turn on light)
Seems like you would connect your switched hot (output from the 2 3-way switches) to black and to grey (all 3 together) and an unswitched hot to the brown.
So, you need to run to the fan a white unswitched neutral, a ground, a black unswitched hot, and a wire that is the switched hot from your downstream 3 way switch.
It would be nice, though, to have some way to depower the hot to the humidity sensor without having to climb up and access the fan unit - perhaps add a separate humidity sensor single pole shutoff switch at switch boxe A?
Sample Diagrams From Manual:
Edit: Proposed solution
There are two parts: switching the LED light/fan and supplying power to the humidity sensor.
Part 1: LED light/fan switching:
I found this diagram (annotation added by me) at MikeHolt.com showing how your light/fan switching should work. As noted above, your black switched hot should be connected to both black and gray on your light/fan.
Part 2: unswitched hot for humidity sensor:
Brown on light/fan should be connected to unswitched hot from box A
Pulling it all together for your wiring:
(Note: some connections in box A and light/fan are 3-wire connections)
- Ignore/disconnect/cap off your current 2-conductor black/white/ground wires running from box A to light/fan
- Make sure existing 3-conductor black/red/white/ground running from box A to box B is connected as shown in Mikeholt.com diagram to switch hot (black) with red and red-taped (important!) wires as the 2 travelers: Its black at box A is connected to incoming black hot; its black at box B is connected to 3rd terminal on 3-way switch; Its red and red-taped white at boxes A and B are connected to terminals 1 and 2 on both switches (travelers).
- Connect new 3-conductor black/red/white/ground running from box A to light/fan as follows: its black wire is connected to 3rd terminal on box A 3-way switch (switched hot); its black wire at light/fan is connected to both black and gray of light/fan; its white wire at box A is connected to incoming white neutral; its white wire at light/fan is connected to white wire there; its red wire at box A is connected to incoming black hot; its red wire at light/fan (unswitched hot) is connected to brown wire there to power humidity function.
- Grounds are connected together AND to metal boxes at all locations as standard wiring practice.