your example is correct.
My suggestion to similar problem (binary intagration) is that the first step must be the drawing of the Area. (A good sketch is semi-success.)
In situation this Area is a rectangle triangle with points (0, 0), (0,1) and (1, 1). Check out!
f2(y) = by def = integ(-inf, inf) f(x,y) dx
by the integration the y is fix.
If you look at the drawing of Area, you can see: f(x, y) = 0 if y<0 or y>1, that means f2(y)=0 if y<0 or y>1.
Oke, focus attention on fix y in [0, 1], for example y=0.25.
y=0.25 is a horizontal line.
Where does this line cross the Area? Firstly at the side y=x, secondly at the side x=1, therefore between y and 1 f(x,y)=8xy, else f(x,y)=0.
So f2(y)= integ(-int, y) 0 dx + integ(y,1) 8xy dx + integ(1,inf) 0 dx = 0 + integ(y,1) 8xy dx + 0 = integ(y,1) 8xy dx.
By the way if f is probability function than it must be satisfy two conditions:
1) f(x, y) >= 0 anywhere
2) integ(-inf, inf) integ(-inf, inf) f(x, y) dx dy = 1.
The first condition is evidently true. But the second we have to control.
integ(0, 1) f1(x) dx = integ(0, 1) f2(0, 1) dy = 1
I hope you understand anything from my poor English.