So far as I know finite sets means the collection of elements such that the number of elements in the collection is 'countable'.
is a finite set because the number of elements in A is 4.
is also a finite set because you can count out the elements in B to be 5.
You may or may-not be familiar with the '...' (ellipsis)* notation where,
and both of these are finite sets mainly because - regardless of what the '...' represents - they do have a finial element, 4 being the last element in A and e being the last element in B.
*the ellipsis '...' represents all the elements that occur in a sequence up until the element after '...' appears in the sequence. Sometimes that sequence is obvious, sometimes not - it usually depends on the context of the set the '...' is used in, for example A could be a set of all natural numbers between 1 and 4 (inclusively) (which in the original example it is) - or, with the ellipsis in place, it could also mean all the natural numbers formed by the powers of 2 by which '...' would represent nothing at all.
However, if A and B were written as,
then you can't deduce the number of elements in C and D - in other words, you can't count them up as you could before and so there is no 'finial' element and so C and D are examples of non-finite (infinite) sets.