How to do a RedirectResponse with a destination query parameter?
Better use a route, so that the path processing in Drupal can do its job. 
If custom.cart_add is the route to /cart/add/{page}, this returns a redirect response with a destination query parameter from a controller:

  return $this-&gt;redirect(
    'custom.cart_add',
    ['page' =&gt; 'p2'],
    [
      'query' =&gt; ['destination' =&gt; 'somewhere'],
      'absolute' =&gt; TRUE,
    ]
  );