If you do check through at JFK (and that's a big if, as TAM and LAN have merged on paper, but their systems still seem far from integrated), you wouldn't need to get through customs. But I guess you'll only find this out at check in, so best be prepared to have to collect your bag, clear customs and check in again. 3h should be enough, but make sure you have a valid visa, or if a visa is required for transit.