Are these your relationships?
With portals to DogLicense and DogRegistration on the Owner layout?
Can one dog have more than one DogLicense Record?
Can one dog have more than one Registration Record?
Owner ---> Dog Registration ---> Dog License
Owner to Dog Registration via Owner ID, Dog Registration to Dog License via Dog ID
There is no direct relationship between owner and dog license
Yes, portals to Dog Registration first, then Dog License on Owner Layout
There should only be one dog registration and one dog license per dog
If there is only one dog registration and one dog license for a given dog. (You aren't storing historical records about a given dog...), then one option is to define a single table with fields for both license and registration info. A dog that is registered but not licensed would have empty fields in the licensing fields. Then a single portal with fields for each or two portals to the same table, but with different sets of fields may be placed on your layout and you won't have any issues linking the two as they are now the same record.
Using your existing setup can be made to work with a script to create new records in the license table. If you wrote a script to go to the last portal row, you'd need to do two things: Give each portal an object name and use Go to Object ["NameofRegistrationportalHere"] to put the focus on the correct portal each time the script runs. Then you'd need to use go to portal row [last], followed by go to portal row [previous] to go to the next to last portal row if you've enabled "allow creation of records via this relationship" for the registration portal.
I'd suggest not trying to interact with the portal directly like that. This script does the same thing more simply and is less vulnerable to future changes to the layout interfering with the script:
If [ Not IsEmpty ( DogRegistration::OwnerID ) //make sure there's at least one registration record in portal ]
Go To Related Record [Show only related records; From table: DogRegistration; Using layout: "DogRegistration" (DogRegistration)]
Go To Record/request/page [last]
Set variable [$RegID ; DogRegistration::RegistrationID ]
Go to Layout [DogLicense]
Set Field [DogLicense::RegistrationID ; $RegID]
Go to layout [original layout]