Ruth Bader Ginsburg shared her marriage advice with J-Lo, and it was truly hilarious