OK... If I understand your scenario correctly what you could do is read a character at a time from source string to a destination string. Each time we do this we check if the character needs to be replaced. Each time we have replaced we use the next char to match.
Dim NumsToMatch As String {"2", "5"}
Dim ReplaceNums as String {"6", "6"}
Dim SourceString as String = "this is 2 my test 5 string"
Dim DestinationStr as New StringBuilder
Dim x = 0
For Each element As Char In SourceString
If element = NumsToMatch(x) Then
DestinationStr.Append(ReplaceNums(x))
x += 1
Else
DestinationStr.Append(element)
End If
Next
Dim OutputStr = DestinationStr.ToString
Output will be "this is 6 my test 6 string"