How to use wp rewrite to hide form action url?

Instead of using fixed php file you can use the custom wordpress templates

create a custom template file and give it a name such as custom template name is step2.php and Step2

/*
    Template Name: Step2
*/

The contents of the custom template file is similar to the content of the file on your step2.php

Or you can use ajax to request but still could not hide the file path step2.php