If you connect a repeater hub to the monitor ports you create a network loop. STP will block one port, without STP your network might go down. If the monitor ports are egress only, a switch would be a better solution (see 3.) as it could keep up with the data rate much better.
Roughly, there are four solutions:
- As Ron has pointed out, RSPAN or similar captures traffic into a VLAN that can be routed from one switch to the other and then to the laptop. This is the clean solution.
- You use the interconnect port as monitor port from the first switch (risking high data rates and frame drops on the interconnect) and connect the laptop to the second switch's monitor port.
- You use a third, small switch that connects to both monitor ports and combines them. Both monitor ports need to be configured to drop all incoming traffic (per ACL or egress-only mode).
- The interconnect ports are used as monitor ports and a third switch is connected in between, mirroring one of its interconnect ports to the monitor port with the laptop (assuming mirroring captures both directions).