Assume $X \sim U[-1,1]$ is a uniform distribution. We can tell intuitively that $$P(X=k|X^2=x^2) = \begin{cases} 1/2 \;\;\;\;\;\;\;\text{if} \;\; k=-x \\ 1/2 \;\;\;\;\;\;\;\text{if} \;\; k=x \end{cases}$$
But I want to confirm this using regular conditional probability. However, when I try the definition as $P(X\in A|Y=y):=\lim\limits_{\{Y=y\}\in U}\frac{P(A\cap U)}{P(U)}$, the conditional probability is $0$ since for example if trying to compute $P(X=2|X^2=4):=\lim\limits_{\epsilon \to 0}\frac{P(X=2 \;\cap\; X^2 \in [4-\epsilon,4+\epsilon])}{P(X^2 \in [4-\epsilon,4+\epsilon])}$, which is just $0$ because $X$ is continuous distribution. Maybe I got something wrong. Please help me compute this conditional probability formally.
I think what you're trying to do is to find conditional law for $X$ and this one question is closely related to the problem of probability kernel.
Theorem
Let $(E_1, \mathcal{E}_1 )$ and $(E_2, \mathcal{E}_2 )$ be two measurable function. Suppose further that $(E_2, \mathcal{E}_2 )$ is regular ( Remark: $\mathbb{R}$ is regular).
Let $m$ be a finite positive measure on $E_1 \otimes E_2$, with $\mu$ as its first marginal law.
Then there is a unique (in almost sure sense) probability kernel from $(E_1, \mathcal{E}_1 )$ to $(E_2, \mathcal{E}_2 )$ such that $m= \mu \otimes p$, that is:
$\int_{E_1 \times E_2} gdm= \int_{E_1} \mu(dx) \int_{E_2} p(x, dy)g(x,y)$
for all measureable function $g:E_1\times E_2 \longrightarrow \mathbb{R_+}$
In particular, we have:
Corollary:
$\mathbb{E}(f(Y) | X) = \int_{\mathbb{R}} f(y) p(X,dy) $ for all positive measureable function $f$, a.s
where $p$ is the respective kernel for $ m= \mathcal{L}(X,Y)$
Remark 1 In fact, there are a lot of technical questions in these statements.(measurability, regularity, almost sureness, spaces of measures, etc.) So if you may, please don't be concerned too much of those because it'll be a heavy burden on you.
Remark 2 Roughly speaking, $p$ represents conditional law.
Remark 3 $p(X=2|X^2=2)$ doesn't mean anything because $P(X^2=2)=0$.We can replace it by anything we want, so "calculating it" also doesn't mean anything. But $\mathcal{L}(X| X^2)$ is a different thing. That's why we introduce the notion of probability kernel.
Back to your question, what you're trying to find is the probability kernel for $(X^2,X)$
. You can find it by your intuition or anything and check it with the unicity in the above theorem ( yeah, this is the right way of *calculating it* in my opinion) then use it in form of the above corollary when you want.
**Appendix **
$\mathcal{L}(X)$: law of $X$.
Disclaim any errors in these statements are mine any maybe due to my reluctance to check the question of almost sureness.