Dim s1 As String = TextBox1.Text
Dim s2 As String = TextBox2.Text
Dim y1, m1, d1 As Integer
y1 = Regex.Match(s1, "\d+\s??(?=سنة)").Value
m1 = Regex.Match(s1, "\d+\s??(?=شهر)").Value
d1 = Regex.Match(s1, "\d+\s??(?=يوم)").Value
Dim y2, m2, d2 As Integer
y2 = Regex.Match(s2, "\d+\s??(?=سنة)").Value
m2 = Regex.Match(s2, "\d+\s??(?=شهر)").Value
d2 = Regex.Match(s2, "\d+\s??(?=يوم)").Value
Dim y, m, d As Integer
y = y1 + y2
m = m1 + m2
d = d1 + d2
If d > 30 Then m += Math.Floor(d / 30) : d = d Mod 30
If m > 12 Then y += Math.Floor(m / 12) : m = m Mod 12
Dim s As String
s = (y & "سنة") & "، " & (m & "شهر") & "، " & (d & "يوم")
TextBox3.Text = s