Turn the sofa over. Remove the broken leg by unscrewing it. If the hanger bolt is still in the sofa, you'll need to remove it. Use a kitchen knife to dislodge it. Legs come with new hanger bolts; the old one may not fit the new leg. Remove a leg that's not broken and take it with you to a home improvement or hardware store.
Ask to see the plastic legs. Compare the plastic leg with the leg removed from the sofa to get a proper fit. The style can be different but the width at the top of the leg should be the same to ensure stability of the couch. If you're unsure, ask the trained assistant in that department. .
Unscrew and remove the remaining legs. Remove the new legs from the package and screw them into the sofa, being careful to screw them in evenly and tightly.
Return the sofa to the upright position. Try moving the sofa back and forth to check for stability. Sit down cautiously the first time to see if the legs will hold the weight of someone sitting on the sofa.