To use your example, trying to solve:
$$x\equiv 10\pmod{24}\\x\equiv 18\pmod{64}$$
You take each in terms of its prime factors:
$$x\equiv 10\pmod {3}\\
x\equiv 10\pmod{8}\\x\equiv 18\pmod {64}
$$
Note that $x\equiv{18}\pmod {64}$ implies $x\equiv 10\pmod 8$, so we are left with:
$$x\equiv 10\pmod {3}\\x\equiv 18\pmod {64}$$
which is a pair of equations with coprime moduli.
You can always do this. Prime factorization is hard, however, so if you wanted an algorithm, you'd want to come up with a more general way than just prime-factorization. There are ways, but I'd have to call them up from memory. But the general gist is that you need to always reduce the problem to the co-prime case, and some way to check for contradictions that rule out solutions.
You made a typo in your computation of the stalks, to define $\gamma$: then numerator should be $\overline{n}$, not $\overline{n}\overline{p_i}^{k_i}$. About your specific questions :
1) By the sheaf property, a global section is the same as a family of sections on opens of a covering, as long as they glue nicely on intersections. Here you have three open (in fact clopen) points which are therefore disjoint : so a global section is just a triple of sections that glue nicely on empty intersections; you can see that this last condition is empty : a global section is just a triple of sections, one on each open point.
Now, if $x$ is an open point, a section on $\{x\}$ is the same as an element of the stalk, which you computed earlier.
2) Well the point is that each point ($(2), (3), (5)$) is open, because they're all closed (and there's finitely many of them). Therefore they form an open covering, and so we go back to what I explained in 1).
3) The point is again that the three points are open, and thus form an open covering. Since they are disjoint, the sheaf property says exactly that the product of the three restrictions is an isomorphism.
So I think the main point you missed was that as each of $(2),(3),(5)$ is closed, they are also open (this uses the fact that there's finitely many of them) and are pairwise disjoint, so the sheaf property applied to the open covering $\{\{(2)\}, \{(3)\}, \{(5)\}\}$ gives the isomorphism (together with your computation of the stalks)
Best Answer
As the comments suggest, this is not always possible. It requires $a_i \equiv a_j \mod p^{k_j}$ for all $k_i > k_j$. If that holds, then all you really have to satisfy is $x \equiv a_l \mod p^{k_l}$ where $k_l$ is the max.