The two novels are by Machado de Assis and share one character, the philosopher Quincas Borba, but each tells a story of its own: The Posthumous Memoirs of Brás Cubas comes first and is the life of Brás; Quincas Borba is the story of Rubião, who inherits the philosopher's fortune.
In The Posthumous Memoirs, Quincas Borba is Brás's schoolmate who reappears as a beggar, steals his watch in an embrace, returns as an heir of an uncle, and expounds Humanitism, and who dies mad in Brás's house, repeating that "pain was an illusion". In Quincas Borba, Rubião, a teacher from Barbacena, looks after the philosopher nearby for about six months and hears from him the doctrine of Humanitas and the maxim "To the victor, the potatoes"; when the philosopher dies, Rubião inherits everything, on condition that he look after the philosopher's dog, which has the same name as its master.
Whoever has not read the first book is not lost in the second: in chapter IV, the narrator introduces the character again, in a few lines, as "that same castaway of existence, who appears there, a beggar, unexpected heir, and inventor of a philosophy". Brás Cubas himself is cited in two scenes of Quincas Borba: the philosopher recalls that he already stole "a watch from my friend Brás Cubas", and it is Brás who tells Rubião of the philosopher's death, in a note, saying that the friend "died yesterday in my house".
It is not, therefore, a sequel. Machado rejects, in the prologue to Quincas Borba, a friend's suggestion to make a trilogy with the Memoirs, leaving Sofia for the third part: "Sofia is all here. To continue her would be to repeat her."