Use this code snippet to display the first category of a WordPress post.
<?php $smello = (array) get_the_category($post_ID]); echo $smello['cat_name']; ?>
where $post_ID is the ID of the post whose category is required.
Change  to  to get the second category. Not all posts will have a second category, so you will have to check if its empty or not before using it.