Perhaps there is a better approach than the one I’m suggesting however hopefully it may help you. I’m not entirely sure you’ll be able to accomplish your use case with the mock, but you could also make use of Postman Echo by using the post endpoint https://docs.postman-echo.com/?version=latest#083e46e7-53ea-87b1-8104-f8917ce58a17 That endpoint should echo the contents of the request body and thus helping you test.
And the final step would be to set up your testscripts to set the respective values of randomFirstName and randomLastName from the response body. Example:
var jsonData = pm.response.json();
pm.environment.set("randomFirstName",jsonData.firstName);
pm.environment.set("randomLastName",jsonData.lastName);
Hopefully, you found this information helpful and useful.