Roots and formation
The femoral nerve forms inside psoas major from the posterior divisions of the anterior rami of L2, L3 and L4. An anterior ramus is the front branch of a spinal nerve; its posterior divisions supply muscles that develop on the back of the limb bud, which in the adult lower limb end up as the extensors on the front of the thigh.
The obturator nerve comes from the same three roots but from their anterior divisions. That shared root level is useful at the bedside, because it lets you tell a femoral nerve lesion from a root or plexus lesion.
