Hi Chirag,
You could pass the values through navigation?
Also if you are not resetting the values in the form, you could use getters to get all the values in the form in the detail page 2.
For example: sap.ui.getCore().byId('input1').value();
Regards,
Naren L Naik