과 would mean that there's not necessarily a correlation between the two things you're talking about, like mentioning the existence of a banana and an apple on the table 하고 would be used when there is one, like in this example, the woman and the boy are both thinking together if you used 과 in this specific sentence, it would mean they're both thinking but not necessarily doing it together
It depends on the verb. What you are noticing is how verbs are conjugated to the formal speech level (합쇼체).
In 합쇼체, all verbs end with -ㅂ니다/-습니다 in the declarative mood. (As you might have already noticed, you can get the stem by dropping -다, or -다 is the ending for the base form of any verb.)
Specifically, the citation form of the verb in this sentence is 생각하다 ("to think"). Verbs with citation forms that end in ~하다 are conjugated to ~합니다.