The funding comes following multiple issues with both NJ Transit and Amtrak, including delays and cancellations.