Step 1: Build a small working example instead of jumping straight to algebra.
Take a simple AP: $3, 6, 9, 12$, so there are $n=4$ terms. The mean of all four terms is $\bar{x}=\frac{3+6+9+12}{4}=\frac{30}{4}=7.5$.
Step 2: Compute the sum of the first $(n-1)$ terms from the example.
The first $(n-1)=3$ terms are $3, 6, 9$, and their sum is $k=3+6+9=18$. The actual 4th term of this AP is $12$.
Step 3: Test each option against these numbers.
$n\bar{x}+k = 4(7.5)+18 = 30+18=48$, which is far too large.
$\bar{x}-nk = 7.5-4(18)=7.5-72=-64.5$, clearly wrong since the term is positive and small.
$k\bar{x}+n = 18(7.5)+4=135+4=139$, also far too large.
$n\bar{x}-k = 4(7.5)-18=30-18=12$, which exactly matches the true 4th term.
Step 4: Confirm the pattern generally.
This works because the sum of all $n$ terms is $n\bar{x}$ (mean times count), and taking away the sum of the first $(n-1)$ terms, which is $k$, leaves exactly the last term. So $n\bar{x}-k$ is not a coincidence for this one example, it follows from how sums and means are built.
Final Answer:
Testing with real numbers confirms the nth term is $n\bar{x}-k$, option (d). \[ \boxed{n\bar{x}-k} \]