the security assist show region tool and access rules cannot used for this purpose.
you will need to hand code this condition on your page.
<?php if($row_ShowMyPics['hopicsidx'] != $row_GetPrimaryPhoto['hoprimePhotoID']) { ?>
They don't match
<?php } else { ?>
They Do Match
?>