I need a simple Google Sheet Script

Job ID: 37494527

Budget: $10 – $30 USD

I need a simple google sheet script to check cell A10 and cell A11 if both cells are value 1 then the script needs to wait 2 seconds then change the cell value of A10 to value 2 and cell A11 to value 2 and then after another 3 seconds it needs to change cell A10 back to value 1 and leave cell A11 as 2. This script needs to run on change