Former US flights at LAX usually use T5 and former AA flights usually use T4 or TBIT. Not always but it's a pretty good general rule.
And I agree that 37 min seems really short to connect T5 to T4. But if AA won't re-ticket, they have to accommodate a mis-connection. The good news is there are plenty of LAX-JFK flights.