Let h = the number of hardcover books and s = the number of softcover books purchased
s + h = 8
s = 8 - h
$26 = $4.00*h + $2.00*s
26 = 4h + 2s
Substitute 8-h in place of s:
26 = 4h + 2(8-h)
26 = 4h + 16 - 2h
10 = 2h
5 = h
s = 8 - h
s = 6 - 5
s = 3
Check:
$26 = $4.00*h + $2.00*s
$26 = ($4)*5 + ($2)*3
$26 = $20 + $6
$26 = $26
Check!