I have flown out of LAX a lot, and you really want way more than 2 hours in LAX. If you're arriving on SW, that is Terminal 1. It is on the far end of one of the U-shaped airport complex. You are going to have get your bags from the baggage claim, drag your bags, your carryon, and yourself to Terminal B. which is on the bottom of the U. Walking sucks, and the terminal transfer busses, are, well, terminal busses. Waiting for them, and stops between chews up time. Then you have check-in, TSA, and then to the gate. If you're like me, it always seems to on the far end of the terminal. (I found that it is a very long ways when you are dragging a 4'11" Filipina with short legs and the wrong shoes.)
If you have one itinerary and you don't have to fool with bags at LAX or the terminal busses, I would still allow a lot of time. You have to walk a long damn ways in the interior of LAX using the transfer hallways.
To summarize:
2 hours - Hurry up, run, stress, and pray to your deity of choice
4 hours - You got this, a little extra time for problems