How many 8-character passwords can be created with given constrains How many unique 8-character passwords can be made from the letters $\{a,b,c,d,e,f,g,h,i,j\}$ if
a) The letters $a,b,c$ must appear at least two times.
b) The letters $a,b,c$ must appear only once and $a$ and $b$ must appear before $c$.
So for the first part I tried:
The format of the password would be $aabbccxy$ , where $x$ and $y$ can be any of the given characters. 
So for $xy$, I have $10^2=100$ variations and for the rest, I can shuffle them in $\frac{6!}{(2! \cdot 2! \cdot 2!)}=90$ ways (the division is so they won't repeat) which makes total of $100*90=9000$ possibilities. 
Now I don't know how to count the permutations when $x$ and $y$ are on different places. I wanted to do another permutation and multiply by $9000$, this time taking all $8$ characters in account, so I get $\frac{8!}{(2!\cdot  2! \cdot 2!)}$, but when $x$ and $y$ have the same value there still will be repetition.
As for the second I have no idea how to approach.

For the first:
count the number of passwords that do not satisfy the condition, then subtract from the total number of passwords
For the second:
Lay down your 5 "non-a,b,c" letters in order. There are $7^5$ ways to do this.
Then you have to lay down the letters a,b,c in the 6 "gaps" between the 5 letters (don't forget the ends):
$|x|x|x|x|x|$ where "|" denotes a gap and $x$ denotes one of the 7 non-a,b,c letters.
We just have to count the number of ways to place a,b,c in the gaps. Place c first, and see how many ways you can place a,b such that they appear before c.
