  Although the Hubble constant $H_0$ and spatial curvature $\Omega_{K}$ have
been measured with very high precision, they still suffer from some tensions.
In this paper, we propose an improved method to combine the observations of
ultra-compact structure in radio quasars and strong gravitational lensing with
quasars acting as background sources to determine $H_0$ and $\Omega_{K}$
simultaneously. By applying the distance sum rule to the time-delay
measurements of 7 strong lensing systems and 120 intermediate-luminosity
quasars calibrated as standard rulers, we obtain stringent constraints on the
Hubble constant ($H_0=78.3\pm2.9 \mathrm{~km~s^{-1}~Mpc^{-1}}$) and the cosmic
curvature ($\Omega_K=0.49\pm0.24$). On the one hand, in the framework of a flat
universe, the measured Hubble constant ($H_0=73.6^{+1.8}_{-1.6}
\mathrm{~km~s^{-1}~Mpc^{-1}}$) is strongly consistent with that derived from
the local distance ladder, with a precision of 2\%. On the other hand, if we
use the local $H_0$ measurement as a prior, our results are marginally
compatible with zero spatial curvature ($\Omega_K=0.23^{+0.15}_{-0.17}$) and
there is no significant deviation from a flat universe. Finally, we also
evaluate whether strongly lensed quasars would produce robust constraints on
$H_0$ and $\Omega_{K}$ in the non-flat and flat $\Lambda$CDM model if the
compact radio structure measurements are available from VLBI observations.
