Can anyone help me out how to make the add user form collapsible in moodle 2.1.3 similar to as that of moodle 2.5.
Yes - take all the code from Moodle 2.5, place it in the directory where you currently have 2.1.3 installed and then click on the 'upgrade' button in your browser ...
On a more serious note - collapsible forms, as far as I know, involve quite a bit of changes to core Moodle files. Several of these changes may not be compatible with the way that javascript is handled in 2.1.3 (I haven't checked, so I don't know for certain).
Also 2.1.3 is now an old version of Moodle - it is not even the most recent version of the 2.1 branch ( http://docs.moodle.org/dev/Releases#Moodle_2.1 ); the most recent version of the 2.1 branch (2.1.10) was released in Jan 2013 with all support for security issues ending in Dec 2012 (well over a year ago). Please upgrade to a more recent version of Moodle, as you are running a version which is likely to contain known security flaws.