The real numbers \(a\) and \(b\) satisfy \(|a| < 1\) and \(|b| < 1.\)
(a) In a grid that extends infinitely, the first row contains the numbers \(1, a, a^2, \dots.\) The second row contains the numbers \(b, ab, a^2b, \dots\) In general, each number is multiplied by \(a\) to give the number to the right of it, and each number is multiplied by \(b\) to give the number below it.
Find the sum of all numbers in the grid.
(b) Now suppose the grid is colored like a chessboard, with alternating black and white squares, as shown below. Find the sum of all the numbers that lie on the black squares.