Pretty simple, replied.
edit: it seems to have gotten deleted from the paste so here it is
PHP Code:
<?
$a = 'Raphael';
$b = 'Castiel';
echo "start $a $b <br />";
$a .= $b;
$b=substr($a,0,(strlen($a)-strlen($b)));
$a=substr($a,strlen($b));
echo "end $a $b <br />";
?>
This solution will work with any two strings regardless of length.
I'm interested in continuing with this so if you'd continue to post them that would be great. I'd also be happy to contribute if you want.