Answer
a. $-3$
b. $3$
Work Step by Step
a. Step 1. Given $\int_0^1 f(x)dx=3$ and $f$ is odd, we have $f(-x)=-f(x)$.
Step 2. Letting $u=-x$, we have $du=-dx$ and the endpoints are $x=-1\to u=1$ and $x=0\to u=0$
Step 3. Evaluate the integral as $\int_{-1}^0 f(x)dx=\int_1^0 f(-u)(-du)=\int_1^0 f(u)du=-\int_0^1 f(u)du=-3$
b. Repeat the above steps for $f$ to be even; we have $f(-x)=f(x)$ and $\int_{-1}^0 f(x)dx=\int_1^0 f(-u)(-du)=-\int_1^0 f(u)du=\int_0^1 f(u)du=3$