Salesforce Ids are both 15 and 18 character long. So for salesforce those two ids are the same. (notice that the only difference is the last 3 capital-case characters).
To simplify things,
- the 15 character Id is uniquely case-sensitive
- the 18 character Id is uniquely case-insensitive (you can calculate this one based on the 15 chars one)
You could say that a Salesforce id has 3 parts
-  sObject prefix
-  sObject-based case-sensitive Id
-  ("optional") calculation that makes the full Id case insensitive
When you use a variable of type
Id, salesforce is using the 18 character one (even if you assign the 15 one, salesforce calculates the other 3 characters automatically)
Why do you need a 18 character Id if the 15 is already unique in a case-sensitive way? Well... there are many tools where you can't use the "case", for example VLOOKUP in excel (even salesforce itself has some automatic case insensitivity builted in).
Notice that there are some automations in place in Salesforce regarding this kind of field-types, so for example, if you have in the where-clause of a query a field of type Id (Id, Look-up, etc) and compare it against a string of 15 characters or 18 characters, the query would still return the good values)
Some useful links: