To find the function \( g(x) \) based on the rule \( r_{x\text{-axis}} \), we need to reflect the function \( f(x) = -2x + 1 \) across the x-axis. Reflecting a function across the x-axis means that we will negate the output of the function, resulting in \( g(x) = -f(x) \).
Starting with the original function: \[ f(x) = -2x + 1 \]
Now we negate it: \[ g(x) = -(-2x + 1) = 2x - 1 \]
Thus, the correct option for \( g(x) \) based on the rule \( r_{x\text{-axis}} \) is: D. g(x) = 2x - 1.