Sorry, I wrote the functions at the top wrong, but i figured it out. It was kind of obvious, but i just was kind of occupied at teh time i was lookign at it, so I really did not notice it.
Basically....
g(X) is the function of a random variable.
fX(x) is a function, maybe a PDF (probabilty density function)
The purpose is to find the expected value of y, but you are only given fX(x).
To find the expected value of x, you need to integrate x*fX(x) dx
To find expected value of y, you could integrate y*fY(y)dy or g(x)*fY(y) dy, however, you are not given fY(y).
However, there is a therom that states all you need to is integrate g(x)fX(x) dx.
I was wondering why we can use g(x)*f(x) dx to find expected value of y.
I found the answer while thinking about it in the car. Basically, g(x) is a function that maps Y to X. you could integrate y*fX(x) dx, but doing so would give you a y term, so to prevent that, we use what y is mapped/equal to.