need help with armature and weight painting
Hard to understand your first picture, but your hip has too much influence on the thigh vertices, so simply select your armature, select your mesh, switch to Weight Paint mode, select the hip bone and use the brush in Blend > Substract mode to remove this influence. You'll have to bring some other corrections on some other parts of the mesh.