what does "reduce A problem to B problem in polynomial time" mean?
There are several types of reductions, the most common of which are many-one reductions and oracle reductions.

A many-one reduction from $A$ to $B$ is a computable function $f$ mapping strings to strings such that $x \in A$ iff $f(x) \in B$.

An oracle reduction from $A$ to $B$ is a computable function $f$ which has access to a $B$-oracle, and satisfies $f(x) = 1$ iff $x \in A$. That is, $f$ decides membership in $A$. The machine has a mechanism for accessing the oracle. When the oracle is presented a string $y$, it tells the program whether $y \in B$ or not.

Every many-one reduction $f$ can be formulated as an oracle reduction: the oracle reduction first computes $f(x)$, then asks the oracle whether $f(x) \in B$, and outputs the oracle's answer.

In the theory of NP-completeness, we always use many-one reductions. Reducing a problem A to a problem B in time $T(n)$ means giving a many-one reduction from A to B which runs in time $T(n)$. In particular, reducing A to B in polynomial time means reducing A to B in time $O(n^k)$ for some fixed $k$.

In your particular case it is hard to tell which kind of reduction is meant, since your problems are not decision problems. Perhaps some restricted kind of linear time oracle reduction, say one accessing the oracle only once. It's also not clear what computation model you should use. Under some computation models you can solve problem A in linear time, and so such a reduction trivially exists (it never asks the oracle anything).