Richard was Richard-5, son of Tristram-4 (Richard-3 John-2 Richard-1) and Martha (Hayes) Pinkham.
See the following sources:
"John Hayes of Dover, New Hampshire; A Book of His Family" by Katharine F. Richmond, 2 vols. (Tyngsboro, MA, 1936) "A Leighton Genealogy: Descendants of Thomas Leighton of Dover, NH" by Perley M. Leighton, 2 vols. (NEHGS, Boston, 1989) "Maine Families in 1790: Volume 1" ed. Ruth Gray (Picton Press, Camden, ME, 1988) submission by Perley Leighton
Elizabeth was the daughter of Thomas-5 and Margaret (Murray) Leighton.Elizabeth's sister Anne, married Richard's brother Tristram (Jr.) also of Steuben.
Richard-3 Pinkham married Elizabeth Leighton, thus making Richard-5 and Elizabeth cousins via the Leighton family.