Rigged pants move together?
To complete this workflow using data transfer I recommend:

Check that armature modifier switched to weight:



Join this two parts (Ctrl+J):



Then apply Data transfer. In unknown reason, it doesn't works with armature even if it first. (maybe, it is because it doesn't grab original mesh from source object)



Then, finally, fix weights using weight paint mode.



Draw weight with needed bone selected.