The question:
Prove that the equation of a line through the distinct points $(a_1,b_1)$ and $(a_2,b_2)$ can be written as $$\det \begin{bmatrix} x & y & 1 \\ a_1 & b_1 & 1 \\ a_2 & b_2 & 1 \end{bmatrix} = 0.$$
I started by writing the two points in the slop-intercept form $y=\frac{a_1-a_2}{b_1-b_2}x + b$ and then writing in standard form as $(a_1-a_2)y-(b_1-b_2)x - b(a_1-a_2) = 0$, and then I take the determinant of the matrix given and I get $(b_1-b_2)x - (a_1-a_2)y + a_1b_2-a_2b_1$. I expected the two to match up, and they are close, but I'm not sure what I'm missing here.
The thing you're missing is to express the $b$ in the equation of the line in terms of the two points $(a_1,b_1)$ and $(a_2,b_2)$.
And notice also that you have the slope backwards, it should be $\frac{b_1-b_2}{a_1-a_2}$ (but I think you got the next part right though). You might want to check this, but the equation of the line will turn out to be
$$y = \frac{b_1-b_2}{a_1-a_2}x+\frac{a_1b_2-b_1a_2}{a_1-a_2},$$
where the last term is equal to the $b$ in your expression.
Using this as your $b$, your rewritten equation $(a_1-a_2)y-(b_1-b_2)x - b(a_1-a_2) = 0$ looks like it becomes exactly the same as the determinant equation.