I need a function that does the following:
- x can not be greater than 1
- y can not be greater then 2
- As x approaches the value 0, then y approaches, but does not reach the value 2.
- As y approaches the 0, then x appproaches, but does not reach the value 1.
The graph of the function should look something like the following image, except for the part where the x value exceeds the value of 1. I need x to only approach the value of 1.

Why do you tag this conic sections? Does $y=2(1-x^p)$ , where $0 \lt p \lt 1$ and the smaller $p$ gets, the closer the bend is to the origin meet your needs? As Arturo Magidin suggests, you should state $x \in (0,1)$
Added: if you really want a conic section, you could use $y=\frac{2}{1-x}$ restricted to $(0,1).$ If that doesn't go deep enough into the corner, $y=\frac{2}{(1-x)^p}$, again with $0 \lt p \lt 1,$ is available, but is no longer a conic section.