You can either place the code snippet in the theme functions.php file or in a custom functionality plugin: http://justintadlock.com/archives/2011/02/02/creating-a-custom-functions-plugin-for-end-users
Edit:
To enqueue custom scripts on the edit page you should use admin_enqueue_scripts e.g.
add_action( 'admin_enqueue_scripts', 'my_jquery_function' );
function my_jquery_function() {
if ( rgget( 'page' ) != 'gf_edit_forms' )
return;
wp_enqueue_script('mytest1', get_stylesheet_directory_uri() . '/assets/javascripts/mytest1.js');
wp_enqueue_script('mytest2', get_stylesheet_directory_uri() . '/assets/javascripts/mytest2.js');
}