To get the ID of the user that was created last, you could run the following query:
SELECT id FROM wp_users ORDER BY user_registered DESC LIMIT 1
To do this within the context of your code, do this:
global $wpdb;
$last_user_id = $wpdb->get_results("SELECT id FROM $wpdb->users ORDER BY user_registered DESC LIMIT 1");
That will give you access to an instance of the WordPress query object and it will properly the query the database regardless of the table prefix.
You can print_r the result to check the result.