You can send the analog speed output of the DC drive to the analog speed input of the AC drive and, if either of those is optically isolated, you will have the isolation you desire.
One word of caution tho. Analog outputs and inputs are generated by digital-to-analog convertors and there is some error when this is done. Some drives have only 10 bit conversion while some have as high as 14 bit.
A more accurate way to get a speed follower signal with isolation would be to use a separate encoder on the DC machine to provide the input speed for the AC machine, or vice versa. There is very little error in this method but it costs more.
A third way to get two drives to track speed together is to provide a speed reference that goes to the input of both drives. That way both are following the same signal. This isn't really a follower scheme but the end result is similar. In this case, the tracking error is whatever the input A/D conversion is.