Connection of the red and yellow wires to the red output terminal of the amp is fine. Connection of the black wire to the black output terminal of the amp is fine if the amp does not have balanced outputs, and is not bridged.
If the amp has balanced outputs or is bridged, the black output terminal will have a full-amplitude audio signal on it, equal but inverted with respect to the signal that is on the red terminal. If a path exists between the circuit ground of the sub and the circuit ground of the amp, the result of connecting to the black terminal in that situation would be that the signal on that terminal will be shorted to ground, possibly damaging the amp. Whether or not such a path will exist depends on the internal grounding configuration of the two components. If both components have their circuit ground and chassis ground connected together, for instance, that path would exist via the AC safety ground wiring in their power cords, and the house wiring (or internal wiring in a power strip or conditioner, if one is being used) that interconnects the respective outlets.
If the amps are balanced or bridged, connecting the black wire to a chassis screw should be safe to try, and may or may not work acceptably depending on the grounding scheme of the amp. If hum or other issues result, and the amp has an unused RCA input connector, an approach that would definitely work is to solder the black wire to the ground sleeve connection point of an RCA plug, leaving the center pin connected to nothing, and inserting that plug into the unused connector. Similarly, if there is an unused XLR input connector, connecting the black wire to XLR pin 1, using a mating XLR connector instead of an RCA plug, would also be a good approach.
Regards,
-- Al