The other page must be included (or required) before it's functions are called. The variables must also be declared global in both functions.. e.g.
// page1.php
<?php
require_once("page2.php");
firstFunction();
function firstFunction() {
global $x, $y;
secondFunction();
echo $x . ", " ...