Suppose that we have a polyhedron in $(x,y)$:
$$P=\{ (x,y) \mid A_1 x + A_2 y \leq b \}$$
How can I find the polyhedron $P_x = \{ x \mid (x,y) \in P \}$? In other words, I would like to write $$P_x=\{x \mid A_x x \leq b_x\}$$ for some $A_x$ and $b_x$.


There are several software packages around which will do the job for you.
Theoretically, you can solve the problem by Fourier-Motzkin elimination. The idea is to eliminate the existential quantifiers in $\mathbf{P}_\mathbf{x} = \{\mathbf{x}\mid\exists \mathbf{y}: A_1\mathbf{x} + A_2\mathbf{y}\leq \mathbf{b}\}$, where bold letters indicate vectors. Application of Fourier-Motzkin elimination yields the matrix $A_x$ and the vector $\mathbf{b}_x$. Be aware that the matrix and the vector will contain redundant rows in general.