I recommend if the character is yours to bring it back into the 3D program you used 1. Make the pants slightly bigger than the legs and 2. Transfer the weights from the leg mesh into the pants, that will allow them to move together practically the same and avoid things like the leg going over the pants like in your second image.