We study the two-weighted estimate [ bigg|sum_{k=0}^na_k(x)int_0^xt^kf(t)dt|L_{q,v}(0,infty)bigg|leq c|f|L_{p,u}(0,infty)|,tag{$*$} ] where the functions $a_k(x)$ are not assumed to be positive. It is shown that for $1<pleq qleqinfty$, provided that the weight $u$ satisfies the certain conditions, the estimate $(*)$ holds if and only if the estimate [ sum_{k=0}^nbigg|a_k(x)int_0^xt^kf(t)dt|L_{q,v}(0,infty)bigg| leq c|f|L_{p,u}(0,infty)|.tag{$**$} ] is fulfilled. The necessary and sufficient conditions for $(**)$ to be valid are well-known. The obtained result can be applied to the estimates of differential operators with variable coefficients in some weighted Sobolev spaces.