Dear SRIDHAR CH,
First of all you have to check the stack ports connectivity.
STEP 1: "Switch1" stack port 1 should be connected with the "Switch2" stack port 2 and Switch 1 stack port 2 should be connected to the switch 2 stack port 1.
STEP 2: After that you have to set the Master and Member priority. The highest priority should be set for Master switch and lower for the Member,
COMMANDS
"Enable"
"configure terminal"
"switch 1 priority 9" so it will become a Member because its priority is smaller.
"switch 2 priority 10" so it will become a Master because its priority is greater.
then renumber the switches
"switch 2 renumber 1"
" switch 1 renumber 2"
Note: once you renumber the switch you must have to allocate the numbers for all the switches in the stack.
then execute the following commands
"wr" to save config.
"reload" to restart.
hope it will help you.