Assuming your product is one that Mathematica doesn't know the closed form for, you could use my answer from Infinite product with O[x] here:
Unprotect[Series];
Series[Product[a_, b_], pt_] := Exp[MapAt[Sum[#, b]&, Series[Log[a], pt], 3]]
Series[Inactive[Product][a_, b_], pt_] := Series[Unevaluated[Product[a, b]], pt]
Protect[Series];
Then:
f = Inactive[Product][2/x + 1 + a[i] x + 1/b[i] x^2, {i, n}];
Series[f, {x, 0, 3}] //TeXForm
$\left(\frac{1}{x}\right)^n \left(2^n+2^{n-1} n x+2^{n-1} \left(\frac{n^2}{4}+2 \sum _i^n
\frac{1}{8} (4 a(i)-1)\right) x^2+\frac{1}{3} 2^n \left(n \sum _i^n \frac{1}{8} (4
a(i)-1)+\frac{1}{4} n \left(\frac{n^2}{4}+2 \sum _i^n \frac{1}{8} (4 a(i)-1)\right)+3
\sum _i^n \frac{-6 a(i) b(i)+b(i)+12}{24 b(i)}\right) x^3+O\left(x^4\right)\right)$
This method won't be able to find the coefficient of $x^{-1}$, though, as finding the $(n-1)^{th}$ term is not possible without specifying an explicit value for $n$.
n
, correct? $\endgroup$