How to include my Ajax calls in one function instead of calling different ones every time?

If you want your code to look good you should properly format it first. Aside from that you are able to combine your AJAX (or to be exact your jQuery/javascript) into one block. Actually you should put it in a separate javascript file, but you can read all about that on the AJAX in Plugins on the Codex page (from where you got your code anyway) or in the WP the right way book.

add_action(
    'admin_footer',
    'my_action_javascript'
);
function my_action_javascript() {
?>
    <script type="text/javascript" >
        jQuery( document ).ready( function( $ ) {
            var data_one = {
                    'action': 'refresh_function_one',
                },
                data_two = {
                    'action': 'refresh_function_two',
                };

            setInterval( function() {
                    $.post( ajaxurl, data_one, function( result ) {
                        $( "#Firstdiv" ).html( result );
                    } );
                    $.post( ajaxurl, data_two, function( result ) {
                        $( "#Seconddiv" ).html( result );
                    } );
                },
                5000
            );
        } );
    </script>
<?php
}
add_action(
    'wp_ajax_refresh_function_one',
    'function_one'
);
add_action(
    'wp_ajax_refresh_function_two',
    'function_two'
);