The likelihood is that your present RD will work with either of those cassettes. You will need to adjust the b screw to the max
most likely and remember to add 2" (4 links) to the chain. Worst case, if you don't like the way it works is to spring for
a $20 wolftooth RD mount extender. FWIW a short cage 9spd DA on my recumbent shifts a 34t cassette without strain.