Have you turned on debugging in your config.php? What is the error?
One idea is that you can’t just use the string syntax “sortBy” like above, try putting it on a different line or put the new Pages thingy in parenthesis before adding sortBy().
$posts = new Pages(array($posts_a, $posts_b));
$posts = $posts->sortBy('date', 'desc');