Switch back to first employer

Hi

I work for employer A, on H1B, employer filed for H1B extension from 2021 to 2024. At the same time I moved to another employer B, after employer B filed the H1B extension from 2021 to 2024. Now employer B laid me off. Can I switch to employer A now?

Thank you
Prasad

Sure you can however company A will need to file change of employer aka transfer petition.