Is this a knapsack problem?
Yes, it is called a multiple-choice knapsack problem. It can be solved in time $O(N B)$ by dynamic programming. The state of the dynamic program is given by a pair $(i, b)$ and the associated value is the maximum value (clicks) you can get with keywords from $1$ to $i$ with a budget at most $b$.   

Source: S. Martello, P. Toth. Knapsack Problems. Wiley, 1990.