Those functions won't work because you aren't passing them the information that they need.
Your first function needs $fname, and $lname to generate the $username to be returned to the calling function. So your function declaration should look something like this:
function genusername($fname, $lname)
Your second function needst $fname, $lname, and $ssn to generate the password to be returned to the calling function. So your function declaration should look something like this:
function genpassword($fname, $lname, $ssn)
Finally you don't need to pass your returning variables through substr(), especially if you want to return the whole value.
So to use these functions you'd do something like this:
$username = genusername("John", "Doe");
$password = genpassword("John", "Doe", "5555555555");