Approximately 7 years
An honest historian must acknowledge that with the Pauline chronology the best we can do is usually +/- a year or so, but we can date several events in his ministry closely enough to create an internally consistent timeline.
Arrival in Corinth
This is approximately AD 50. Two of the most helpful markers here are:
- Claudius' expulsion of the Jews from Rome - Paulus Orosius dates this event to the 9th year of Claudius—presumably AD 49 (Historiae adversum paganos 7.6.15-16), although some have questioned his precision. If the expulsion occurred in AD 49 (or even just relatively close to it), that would put Paul in Corinth in the early 50s.
- Paul's trial before Gallio, the deputy of Achaia (Acts 18:12-16) - thanks to an inscription we know with fairly decent precision when Gallio was in office and can date this event in Paul’s life to approximately AD 51 (maybe 52). See a detailed discussion on the inscription and its significance here (pp. 33-34)
Since Acts 18:2 suggests that Claudius' expulsion edict (~49) is a recent event, and the Gallio trial in 51 or 52 takes place after Paul has been in Corinth for 18 months (Acts 18:11), Paul arrived in Corinth in about AD 50.
Final (recorded) trip to Jerusalem
This is approximately AD 57; we can arrive at this date two ways:
- Counting back from the beginning of the tenure of Porcius Festus.
Paul has been in custody for 2 years by this time (Acts 24:27), and a
decent estimate for the beginning of Festus' term is AD 59, meaning
Paul's arrest and imprisonment under Felix--which came shortly after
his arrival as noted in the OP, would be AD 57. A more detailed
discussion of the Festus chronology by Robinson is found here
(pp. 40-43).
- Counting forward from Paul's time in Corinth. The longest timespans noted in Acts are the 18+ month interval in Corinth (Acts 18:11), and the 2+ years in Ephesus (Acts 19:10), though many exegetes hold that Paul was in Ephesus for longer than two years. Incorporating the numerous other travels, observances of feasts, etc., Paul's 2nd and 3rd missionary journeys require 7 or 8 years.
A plausible timeline
AD 49 - Paul embarks on 2nd missionary journey
AD 50 - Paul arrives in Corinth (OP passage #1), where he will be for more than 18 months
AD 52 or 53 - Paul returns to Judea (see Acts 18:20), after additional time in Corinth + a trip to Ephesus
AD 53 - Paul embarks on his 3rd missionary journey, which includes a 2+ year stay in Ephesus
AD 56 - Paul travels to Corinth, winters there, and writes his Epistle to the Romans
AD 57 - Paul returns to Jerusalem in the Spring (OP passage #2)
Conclusion
If Paul arrived in Corinth circa AD 50 and arrived in Jerusalem circa AD 57, there's a 7-year interval between the references noted in the OP.
Note that Paul did in fact make 1 trip to (or near) Jerusalem in between these events, to attend the feast noted in Acts 18:20-21.