I have 3 insert stored procedures each SP inserts data in 2 different tables
Table 1 Table 2 idPerson idProduct
You could add an OUTPUT parameter to test2, and set it to the new id straight after the INSERT using:
SELECT @NewIdOutputParam = SCOPE_IDENTITY()
Then in test1, retrieve it like so:
DECLARE @NewId INTEGER EXECUTE test2 @NewId OUTPUT -- Now use @NewId as needed