Actually, he was kind of doing exactly that.
Reagan responded to that bombing by removing our troops from that dump. They never should have been there in the first place. U.S. Secretary of Defense Caspar Weinberger had been adamantly opposed to the deployment from the start.
Iran killed our marines in Beirut.