How many paths are there from $A$ to $B$ on the lines of the grid shown, if every step must be up or to the right?[asy]size(3cm,3cm);int w=6;int h=3;int i;for (i=0; i<h; ++i){ draw((0,i) -- (w-1,i));}for (i=0; i<w; ++i){ draw((i, 0)--(i,h-1));}label("$B$", (w-1,h-1), NE);label("$A$", (0,0), SW);[/asy]
For example, here is one such valid path highlighted in blue:
[asy]
size(3cm,3cm);
int w=6;
int h=3;
int i;
for (i=0; i<h; ++i){ 
draw((0,i) -- (w-1,i));
}for (i=0; i<w; ++i){ 
draw((i, 0)--(i,h-1));
}
label("$B$", (w-1,h-1), NE);
label("$A$", (0,0), SW);

draw((0,0)--(1,0), blue+1.5);
draw((1,0)--(1,1), blue+1.5);
draw((1,1)--(2,1), blue+1.5);
draw((2,1)--(3,1), blue+1.5);
draw((3,1)--(4,1), blue+1.5);
draw((4,1)--(4,2), blue+1.5);
draw((4,2)--(5,2), blue+1.5);
[/asy]
There are 5 steps to the right, and 2 steps up.  These 7 steps can be made in any order, so the answer is $\dbinom{7}{2} = \dfrac{7 \times 6}{2 \times 1} = \boxed{21}$.