You perform two sql insert statements in your controller function, one on each table. (That does not answer your question, but why would you want to use a single insert?)
Or you create an updatable view for the tables in your DBMS and perform an insert on that view.
Or you create a trigger on the first table in your DBMS and perform an insert on the first table.
public function afterSave(){
parent::afterSave();
$tab2 = new Tab2();
$tab2->id1=$this->id1;
$tab2->name=$this->name;
$tab2->action=$this->action;
$tab2->save();
}
I supposed that name and action in table2 will be the same as in table1…
If not, then you have to set different values in afterSave method.