WebElain was correct but, you’ve also got the HTML escaped. The entire chunk of code should be:
function thb_display_category_cus() {
if ('portfolio' === get_post_type() ) {
$categories = get_the_term_list( get_the_ID(), 'portfolio-category', '', ', ', '' );
echo $categories
} else {
the_category(', ' );
}
}