The Or goes between multiple EndsWith calls, not within one, e.g.
vb.net Code:
If str.EndsWith(substr1) OrElse str.EndsWith(substr2) Then
Notice the use of OrElse rather than Or. Likewise you generally use AndAlso rather than And.
Having said that, given that you are looking for substrings of the same length in each case, you could structure your code a little differently, e.g.
vb.net Code:
If {substr1, substr2}.Contains(str.Substring(str.Length - substringLength)) Then
The list you call Contains on can be any length and be constructed any way you like.