In my experience, it is likely that you will receive an I-94 at your first entry in LAX - and ordinarily it will be valid for 6 months. I believe that you should keep this I-94 when you leave to go to Mexico, and show it at your re-entry. Because you should have your ticket/schedule print-out, you'll be able to prove it is one continuous trip. That should allow you easy entry on return from Mexico. You should hand your I-94 to the airline when you leave the USA to return home.
The above has been both my, and my wife's, personal experience. BUT - I am not a lawyer, and, as is noted above, ICE can make any determination at any border crossing.
You may find the State department web-site informative: travel.state.gov
Happy travels!