Lay the garment at your sewing machine so that the front of it is being fed in, with the back piece behind the machine - as pictured - with the wrong side facing up.
At the crotch seam, line the elastic up with the edge of the fabric, and have your machine set to a wide and long zig zag stitch.
Alternatively, use a serger set to a fairly long stitch length - pictured.
Sew the elastic to the front portion of the panty, (wrong side) stretching both pieces as you go. You should stretch the elastic ever so slightly more than the fabric, but stretch both well.
Keep the elastic lined up with the side edge as you go.
When you get to the side seam, stop sewing, and straighten the elastic out so that it continues to lay across the leg opening. It will be much shorter than the actual fabric.
While firmly holding the elastic and suit near where you stopped, stretch the upcoming section of suit and elastic together, till they match up. Find the approximate mid point of both the fabric and the elastic, and hold them together.
Sew from the side seam to the mid point, stretching the elastic to match up with the edge, and then some (the fabric should also be stretching, just not as much - proportionately - as the elastic.)
When you reach the mid point, you can let go of it, and grasp the original start point.
Stretch the elastic and fabric once again, and sew the rest of the way around the leg opening.
If you did not make a loop with the elastic before beginning, overlap the end of the elastic over the starting edge by about ½", stitch to secure.
Cut the threads close to the fabric.
Repeat with the other leg, starting at the hip seam, rather than the crotch seam.