From Casella Berger exercise 5.65: Let us have $X \sim f$. Then, assume we produce $m$ i.i.d. random variables $Y_1,...,Y_m$ from another distribution $g$.
Let us have
$$q_i = \frac{\frac{f(Y_i)}{g(Y_i)}}{\sum_{j = 1}^{m}\frac{f(Y_j)}{g(Y_j)}}$$
Now, we generate random variables $X^\star$ from the discrete distribution of $P(X^\star = Y_i) = q_i$. This technique seems to be called "Sampling/Importance Resampling (SIR) / weighted bootstrap".
I need to show that $X_1^\star, X_2^\star, ..., X_r^\star,..$ are approximately a sample from $f$.
The textbook hint given says: "Show that $P(X^\star \leq x) = \sum_{i = 1}^m q_iI(Y_i \leq x)$. From there use WLLN."
The hint itself seems wrong - we are not supposed to have indicator random variables $I(Y_i \leq x)$ in the definition of $P(X^\star \leq x)$.
The solution manual on the internet is wrong. The issue in my reasoning:
$$P(X^\star \leq x) = \sum_{i = 1}^m P(X^\star \leq x | X^\star = Y_i)P(X^\star = Y_i) = \sum_{i = 1}^m P(Y_i \leq x)q_i = P(Y_i \leq x)\sum_{i = 1}^m q_i$$
This does not look anything like the required equality in the hint. We arrived at the conclusion that $F_{X^\star}(x) = G_Y(x)$. Which is back to the definition...
How can this be shown, preferably using WLLN?