The proper statistical way of calculating such difference would be to add a group indicator variable interacted with the slopes that you would like to test and compare it with the model where the group indicator variable is not present. This procedure helps you to work with the full data, and the sample difference between them will be encoded in the standard errors of the group parameter's estimates.
Here is the explanation of such procedure. Suppose the first group is named group $a$ and the second one is group $b$. You should compare your full model:
$$ g(\mu) = \beta_0 + \beta_1x + \beta_2x^2 +\beta_3zx^2 + \beta_4zx + \beta_5z\tag{full model} $$
with group interactions effect:
$$ g(\mu) = \beta_0 + \beta_1x + \beta_2x^2 +\beta_3zx^2 + \beta_4zx + \beta_5z + \beta_6zx^2\cdot\mathbb{1}_{g=b} + \beta_7zx\cdot\mathbb{1}_{g=b} + \beta_8z\cdot\mathbb{1}_{g=b} + \beta_9\mathbb{1}_{g=b} $$
$\beta_9$ should be included in the model if there is a difference in the mean levels of the response variable between the two groups ($a$ or $b$). The base line of the proposed model is then in reference to group $a$. Note that if there is a difference between groups exists, the estimates for the curvature parameters are updated by the terms where $\mathbb{1}_{g=b}$ is true.
So who do you test the model? There are a number of approaches:
- Wald test for $\beta_6$, $\beta_7$, $\beta_8$ and $\beta_9$
- likelihood ratio tests between the full model and the proposed model
- score tests
- etc..