First off all, I don't know what the components like R4, R5, CAP are used for. To turn on the triac only R6 and R4 are needed. R4 is used in order to prevent the triac from spurious triggering that may be caused by floating gate terminal. You have to be familiar with some fundamentals concerning the triac working principle. To trigger the triac (to turn it on) a current must be fed into the gate. The value of this current is usually in the range of 5..50 mA. The current may be positive or negative. When current flows into the gate there is a voltage drop between the gate and T1 terminal which is approx. 0.7..1V. The gate current turns on the triac and load current begins to flow. The load current produces voltage drop across T1 and T2 terminals of the triac which is about 1.5V. The triac conducts untill the load current drops nearly to zero (this happens when the AC power supply sine wave voltage crosses the zero point). If the gate current is still present the triac will be turned on again when the next half sine wave appears.
Now, lets return to your circuit.
In order for the U2 triac to be turned on there must be appropriate voltage across its T1 and T2 terminals (at least 1.5V). Also, 0.7V at the U2 triac gate must be taken into account. So the total voltage needed to turn on the U2 is 1.5 + 0.7 = 2.2V (in fact this voltage must be slightly higher than 2.2V) When the condition is met, the U2 triac is turned on and load current will flow. For the next half sine wave the triac will conduct load current sustaining voltage drop across T1 and T2 terminals (about 1.5V).
The worst case is when the U2 optotriac is activated at the moment the instantaneous power supply voltage reaches its maximum absolute value, that is, 320V. (assuming we use 230V AC as power supply). This voltage value will force large T2 gate current (it will flow for a very short period of time, though). The gate current will be approx. 320 / (22 + 180) = 1.58A. The U2 triac will be swiched on and the voltage across its T1 and T2 terminals will rapidly drop to 1.5V.
The turn-on time is typically a few microseconds for a typical triac so there is no risk of overloading R6 resistor and the U2 triac gate itself.