As above, they are both terrier breeds so the dog will need to be reminded who the boss is; i don’t mean that in a harsh way, just little things like making sure the dog eats dinner after the family (as is natural for the lowest ranking member of the pack).
They are intelligent, inquisitive and friendly breeds, but they can sometimes be a little too independent if somehting catches their attention. If you have anything at home that squeaks, flutters or scurries, then make sure it’s secure! Remember, terriers were bred to be tenacious killers, so don’t let their size fool you.
Our 5 month old JRT has responded brilliantly to proper training classes too. Very highly recommended, especially as this is your first dog.