Unable to add torznab indexes from Jackett

If you mean the API key that is shown in the “General” settings area of the Sonarr settings then yeah those will be different, but the API key used on the indexer should be the same one Jackett shows.

wrt the port I am frankly not terribly sure. If you go to the indexer setting in sonarr, click on it then copy the URL that’s listed and paste it into a new browser tab you should see something like this

which is fine because the URL doesn’t have the API key in it, but it shows that jackett responds on that port and that URL. If you don’t get a response there then jackett doesn’t seem to be listening on the port you’ve set.