Correct Forms of Address has an entire section on Earls and their progeny, if you scroll down a little. Let’s just… not call Thomas Mr. Hamilton, please. He’s not likely to have been any such thing, unless the story happens while his grandfather is alive when he might still have been called Master of [insert property here].
Wikipedia also has a list of courtesy titles used by the sons and grandsons of British and Irish peers, here, if more of a pattern is desired. Thomas’ of course if a courtesy title, one of his father’s lesser ones. Since his father is the Earl of Ashbourne, he’s The Viscount [slips my mind at the moment], not The Viscount of [placename] since that is still Daddy Dearest. He is announced and addressed formally as The Right Honbl the Viscount [whatsitsname], informally and socially as The Viscount [song remains the same], addressed and referred to in speech as Lord [second verse same as the first] or plain [dammit what *is* the place-name]. Only immediate family or very close friends would call him Thomas, or not even then, since a lot of familial nicknames of the period or a little later are modifications of the title and therefore the chief estate owned. But family is at least allowed the Christian name from the start, as late as Dickens you can see the use of the last name unmodified by title as a mark of great closeness among friends; it’s a thing to be earned and Dickens was born in 1812, nearly/more than a century after the show. Hell, as late as books written in the Edwardian era, if not later, you can still see the same thing. Look at Wodehouse, how few people call Wooster Bertie and how close they are. It takes the World Wars to bring first names into easier usage. So for Thomas to allow, to insist on the first name, and so early marks him out as dangerously radical, and if he’s going around offering the use of it to people so much socially inferior to him I shouldn’t be surprised his father didn’t have to work hard to convince people he wasn’t right in the head; they’d have been thinking it already. You don’t simply not *use* the Christian name, you don’t even really think of people by it, simply because they’re never that for you.
Hell, Thomas wouldn’t even be Lord Hamilton, I don’t think, since the Lord/Viscount implies a Lord of [yup, that place-name again]. Sir Firstname Lastname, if of the Hamilton family would be Sir Firstname Hamilton, maybe Sir Hamilton, but iirc Sir goes with Firstname rather than Lastname. Exceptions do occur, like Alfred, Lord Tennyson, who was made a lifetime peer and not awarded an estate to go with it. Again this is much later and I can’t say whether the same prevails in 1705. In any case it’s irrelevant for Thomas.
*ahem* right, carrying on.
We don’t know what Miranda’s natal rank is, and she could be plain (The Honbl) Miss Barlow quite easily and still be highly connected (a viscount’s daughter, say); Correct Forms, linked above, also has the pre- and post-marriage titles of noblewomen of all ranks listed in some detail. Post-marriage she’d be The Right Honbl The Viscountess [whatever it is], called variously Madame, My Lady, Lady [you know what goes here]. She is not Lady Hamilton, since that would imply her husband is Sir Firstname Hamilton rather than a Viscount.