we use this formula "n!/p!.q!.r!" to compute permutation of n items containing p,q,n number of similar items, n= p+q+r+x (where x=n-(p+q+r)).
this formula stand true when length of permutation > max similar items i.e., Max(p,q,r).
but in the above problem we have permutation length as 2 which is < number of a's i.e, 4.
in such case how to compute permutation of items.
Selecting 2 objects from {${a,a,a,a,b,c,d}$} will be the same as selecting two objects from {${a,a,b,c,d}$} because you don't actually get to see more than 2 $a's$ at a time.
From here you can either make cases or find the coefficient of $x^2$ in the expression
$2!(1+x+\frac{x^2}{2!})(1+x)^3$
Which comes out to be 13
Just for the sake of completeness here are the permutations
${aa,ab,ac,ad,ba,bc,bd,ca,cb,cd,da,db,dc}$