If you can leave and come back the day after your plans, LAN has availability on LP511 MIA-LIM on 05/29 at 01.20 (the night of 05/28). They also have availability on LA531 JFK-LIM on 05/28 at 23.30 (same evening as the MIA flight).
They have seats on LP510 LIM-MIA on 08/08 as well.
AA has plenty of T seats RDU-MIA and MIA-RDU on both of those dates. Some RDU-EWR flights are available on 05/28 to connect to JFK-LIM as well, but I would just stick to MIA in this case.