A critical point here is to note that the total number of tickets is not set a priori. This is good, because it makes the expected utility function non-linear in $t_i$, and so permits us to proceed (half-way).
Writing $S$ for the total number of tickets and $S_{-i}$ for the total number minus the purchases of one bunny $i$, and simplifying, the expected utility is
$$\mathbb{E}[u_i(t_i, g_i)] = \frac{t_i}{S}\cdot g_i(C,x) -pt_i \tag{1}$$$$\mathbb{E}[u_i(t_i, g_i)] = \frac{t_i}{S}\cdot g_i\cdot [C-x^2+x] -pt_i \tag{1}$$
The first order condition for utility maximization of one bunny with respect to number of tickets bought is,
$$\frac {\partial \mathbb{E}[u_i(t_i, g_i)]}{\partial t_i} = \frac{S_{-i}}{S^2}g_i(C,x) - p=0$$$$\frac {\partial \mathbb{E}[u_i(t_i, g_i)]}{\partial t_i} = \frac{S_{-i}}{S^2}g_i\cdot [C-x^2+x] - p=0$$
$$\implies t_i = \left(\frac {S_{-i} g_i(C,x)}{p}\right)^{1/2} - S_{-i} \tag{2}$$$$\implies t_i = \left(\frac {S_{-i} g_i\cdot [C-x^2+x]}{p}\right)^{1/2} - S_{-i} \tag{2}$$
Now the way the problem is formed, I understand that all bunnies are identical, as regards their preferences. It also appears that thereThe second-order condition is no income constraint heresatisfied so this will be a maximum. So with respectRearranging $(2)$ we obtain
$$S = \left(\frac {S_{-i} g_i\cdot [C-x^2+x]}{p}\right)^{1/2} \tag{3}$$
The choice of $i$ was arbitrary so we have
$$S_{-i} g_i = S_{-j} g_j,\;\;\; \forall i\neq j \implies (S-t_i)g_i = (S-t_j)g_j$$
$$\implies t_j = S - \frac {g_i}{g_j}(S-t_i), \;\;\; \forall j\neq i \tag{4}$$
Summing over $j\neq i$ we obtain
$$S-t_i =S_{-i} = (n-1)S - (S-t_i)g_i\sum_{j\neq i}g_j^{-1} $$
$$\implies (S-t_i) = \frac {n-1}{1+g_i\sum_{j\neq i}g_j^{-1}}S \tag{5}$$
Inserting $(5)$ into $(3)$ we get
$$S = \left(\frac {\frac {n-1}{1+g_i\sum_{j\neq i}g_j^{-1}}S g_i\cdot [C-x^2+x]}{p}\right)^{1/2}$$
$$\implies S = \frac {(n-1)g_i\cdot [C-x^2+x]}{\left(1+g_i\sum_{j\neq i}g_j^{-1}\right)p} \tag{6}$$
We were able to express total demand as a function of the fox's scheme,decision variables of the bunnies are totally identicalfox, and each bunny will buy the same numberparameters/random variables of ticketsthe model. SoNevertheless it also hints at the problem here $S_{-i} = (n-1)t_i$ and(multiply by $(2)$ becomes$p$ to get the revenue function), but let's derive it explicitly.
$$t_i = \frac {n-1}{n^2}\frac {g_i(C,x)}{p} \tag{3}$$ For later use, from $(5)$ we also get
Moreover$$t_i = S\left(1-\frac {n-1}{1+g_i\sum_{j\neq i}g_j^{-1}}\right) \tag{7}$$
Turning to the profitsprofit function of the fox are, it has certain gross revenues equal to certain: there is no probability of graver loss other than refunding one$pS$ and then she will have to payback the amount paid by the bunny that gets to win the lottery. So we have with certaintyprobability $t_i/S$ the fox gets $pS - pt_i$. So the expected profit function, after ticket sales have been finalized and before the lottery draw, is
$$\pi = (n-1)pt_i \tag{4}$$$$E(\pi) = \sum_{i=1}^n \frac {t_i}{S}\left(pS - pt_i\right) = p\sum_{i=1}^n \frac {t_i(S-t_i)}{S} \tag{8}$$
We getInserting $(5),(7)$ into $(8)$, we have
$$(3),(4) \rightarrow \pi = \left (\frac{n-1}{n}\right)^2\cdot g_i(C,x)$$$$E(\pi) = p\sum_{i=1}^n \frac {S\left(1-\frac {n-1}{1+g_i\sum_{j\neq i}g_j^{-1}}\right)\left(\frac {n-1}{1+g_i\sum_{j\neq i}g_j^{-1}}S\right)}{S} $$
and maximum profits are where the$$= pS\sum_{i=1}^n \left(1-\frac {n-1}{1+g_i\sum_{j\neq i}g_j^{-1}}\right)\left(\frac {n-1}{1+g_i\sum_{j\neq i}g_j^{-1}}\right)$$
Using also $g$ function is maximized$(6)$ we get, which determinesafter simplification
$$E(\pi) = \frac {(n-1)^2g_i\cdot [C-x^2+x]}{1+g_i\sum_{j\neq i}g_j^{-1}}\cdot \sum_{i=1}^n \left[\frac {\left(g_i\sum_{j\neq i}g_j^{-1}-n+2\right)}{\left(1+g_i\sum_{j\neq i}g_j^{-1}\right)^2}\right] \tag{9}$$
Equation $x^*$. And this is where$(9)$ reveals the problem liesissues here: ticket price remains indeterminateWhile from $(3)$ the fox can infer all actually realized $g_i$'s, ex ante, the expected profit function looks like a very complicated function of $n$ Uniform $(0,1)$ random variables.
The profit function is linear in priceBut most importantly, this is the problem profit does not depend on price (since to begin with Total Revenue does not depend on price). While this is standard in a perfectly competitive environment (where market equilibrium determines price), here we have a monopoly. To fix this, one should go back to the expected utility function and change its quasi-linear form, and assume instead concave utility in $pt_i$, $v(pt_i), v'>0, v''<0$. This will maintain price as an argument of the profit function together with $x$, and maximization of profit with respect to $(p,x)$ jointly could be attempted.