Answer:
Sam's capital account = $60,000 (for 1/5 of the firm)
the firm's total value = $60,000 x 5 = $300,000
goodwill = $300,000 - ($60,000 + $80,000 + $60,000) = $100,000
Hem's share of goodwill = ($80,000 / $140,000) x $100,000 = $57,143
Nem's share of goodwill = $100,000 - $57,143 = $42,857
the journal entry used to record goodwill:
Dr Goodwill 100,000
Cr Hem, capital, 57,143
Cr Nem, capital, 42,857