Barney is, of course, completely shocked by Valancy's proposal, and not just because women proposing marriage to men simply isn't done. While they have had friendly conversations- and an evening out together- they aren't close... Barney has never even called her by her first name, always referring to her as 'Miss Stirling'. He is incredulous when Valancy tells him that she loves him. When she shows him Dr. Trent's letter though, Barney is quick to comprehend; he knows what her life was like before and knows that she can't bear to spend what little time she has left like that. This is what motivates him to accept Valancy's proposal, and it points to the characteristics that made Valancy fall in love with him to begin with: his understanding and innate kindness, not just to her, but to Cissy and even Roaring Abel. He might have been able to gently turn Valancy down had she merely declared her feelings to him, but he won't send her back to Deerwood to live out the last months of her life in misery.
There is a welcome moment of levity when Valancy gives Barney another letter: one of explanation that he is to give to her mother when she inevitably dies suddenly. Admittedly not a likely subject for humour, but the two share a laugh at the thought of Valancy's family- already convinced that Barney's a criminal- suspecting that he's poisoned her. This is something they share: an ability to laugh at themselves and their circumstances, even when they are rather grim. Valancy's one stipulation is that Barney never refer to her illness, or urge her to be careful. She wants to live out whatever time she has left doing what she loves without fear of the consequence to her health, reasoning it's better to live sixth months freely and happily than a year in fear and dread.