The only way to match those would be to have sequential ticket numbers, then modify the "next number" field (this is in the database) to match the next database ID number for the next ticket (again more looking in the database).
Generally not doable though and probably fine to live with as is as people will generally refer to the ticket number and you can easily search for ticket number.
When using the default of random ticket numbers the URL will never match the ticket ID too.