How to use the post_updated hook before and after arguments

First off you are using the function wrong. The function is tied to an action within wordpress whenever you use the add_action function. In this case you have added it to the post_updated action.

Basically your check_values function gets added to a queue which will then get called by the action when its time to do the action.

You can see where the action gets called here: https://core.trac.wordpress.org/browser/tags/4.4/src/wp-includes/post.php#L3359

See line 3359 of this file. There is a function called do_action and its going to call all the functions tied to the post_updated action. This would include your check_values function. This is where your function is getting called and as you can see it passes in the necessary parameters for your function to interact with.

Try updating or adding a post. You should see some output there because this is when wordpress is calling your function.

Then in order to check to see if there was a change compare the two titles from the two before and after post objects

<?php 

function check_values($post_ID, $post_after, $post_before){
    if( $post_after->post_title !== $post_before->post_title ) {
        // do something
    }
}

add_action( 'post_updated', 'check_values', 10, 3 );
?>