LA (the city) is relatively dense (medium-high density) compared to its cursory reputation of being low density.
but public transit here is imperfect, to be sure. it's good if you live near a train line, and not so good if you have to depend only on buses. LA metro and LADOT are trying to change that, but it's a frustratingly slow process. micro-mobility options (e-scooters, e-bikes, car share, etc.) help.
Density of city limits would maybe be more appropriate when talking about subway service or LA's light rail. So that'd be about 8,092/sq mi for LA and 28,491/sq mi for NYC. Maybe MSA would make sense for things like commuter rail, which runs something like every 20 or 30 minutes (hourly on weekends) for Metro North.