It appears that the first and Else of the second If statement are the same. It's really the "SI" that is different. I'm not sure exactly the controls you're using, so you may have to mess with this a bit to get everything to work. I put this formula in the OnChange of dp_Servicio.Selected
Also, the error message you're getting means you're trying to perform an action (create a variable) in a control or property that doesn't allow that. For example, you can't create a variable in the Color property.
Set(
gResult,
DateDiff(
dp_Fecha_Inicio_Solicitud.SelectedDate + Time(
Value(dp_Hora_Inicio.Selected.Value),
Value(dp_Min_Inicio.Selected.Value),
0
),
dp_Fecha_Fin_Solicitud.SelectedDate + Time(
Value(dp_Hora_Final.Selected.Value),
Value(dp_Min_Final.Selected.Value),
0
),
TimeUnit.Hours
) - If(
Self.SelectedText.Text = "SI",
3,
0
)
)