Answer
We need 10 candies of the first kind, 20 of the second kind.
Work Step by Step
Let $x$ be the number of candies of the first kind, then $30-x$ is the amount of the second kind.
Then our equation is: $0.45x+0.25\cdot(30-x)=9.5\\0.45x+7.5-0.25x=9.5\\0.2x=2\\x=10$
Thus we need 10 candies of the first kind, 20 of the second kind.