Good morning
The image that accompanies your approach does not show the expected effect or at least the one achieved so far by code; On the basis that it only shows the structure of the table to be filled out, I will comment on it below .
create in php an array that through iteration you fill with the values to insert in each field; example:
$totalValores=12; // Numero de campos que contiene tu tabla
$valorInsertar = 20000; // De la imagen corresponde al campo costo1 con id_cantidad=1
$porcentajeIncremento=0.20; // Porcentaje que se incrementa
$aumentaCadaPagos=3; // Cada cuantos pagos aumentas; en tu planteamiento lo aumentas cada 3
$valores= array();
for($i=0; $i<$totalValores;$i++){
if (($i>0) && (($i % $aumentaCadaPagos)==0))
$valorInsertar=$valorInsertar*(1+$porcentajeIncremento);
$valores[]=$valorInsertar;
}
// al terminar la iteracción anterior tendrás los valores
// Ahora armar el SQL INSERT
$cSQL="INSERT INTO CUOTAS VALUES("; // Asumo la tabla de la ilustación se llama "cuotas".
$cSQL.=implode(",", $valores).")";
// y lo pasas a tu proceso donde se envia la petición a ejecutarse a la BD.
Be useful or give you an idea for your need.