Concept:
For a probability mass function,
\[
\sum P(X=x)=1.
\]
Since \(X\) takes values
\[
0,1,2,\ldots,
\]
the given distribution forms an infinite geometric series.
Step 1: Apply the total probability condition
\[
\sum_{x=0}^{\infty}P(X=x)=1.
\]
Substituting,
\[
\sum_{x=0}^{\infty}ak^x=1.
\]
Taking \(a\) common,
\[
a\sum_{x=0}^{\infty}k^x=1.
\]
Step 2: Use the geometric series formula
For
\[
|k|<1,
\]
\[
\sum_{x=0}^{\infty}k^x
=
\frac{1}{1-k}.
\]
Therefore,
\[
a\left(\frac1{1-k}\right)=1.
\]
\[
a=1-k.
\]
Hence,
\[
k=1-a.
\]
Step 3: Determine the restriction
Since the infinite geometric series must converge,
\[
|k|<1.
\]
Also probabilities must be positive, therefore
\[
0<a<1.
\]
Thus,
\[
\boxed{k=1-a,\quad 0<a<1}.
\]
Hence the correct answer is
\[
\boxed{(A)}.
\]