The db2 software path should be /db2/db2<sid>/db2_software and not /opt/ibm/db2/V9.7. you should not use this path /opt/ibm/db2/V9.7 and should not install any db2 software here. Also enter the correct RDBMS DVD location .
Please make sure you enter the correct inputs in SAPINST.
Regards
Ratnajit