Use \, (or similar) to add space to differential elements in integrals. Good habit in general, and helps readability, particularly with e.g. dx dy dz, etc.

Is my relation correct?

Yes, it's correct. And here is the derivation:

mechanical work is defined as: $$W = \int_{V_i}^{V_f}PdV$$$$W = \int_{V_i}^{V_f}P\,dV$$

multiplying by $$\frac{V^{k}}{V^{k}}$$: $$W = \int_{V_i}^{V_f}\frac{PV^{k}}{V^{k}}dV$$$$W = \int_{V_i}^{V_f}\frac{PV^{k}}{V^{k}}\,dV$$

Since $$PV^{k}$$ is constant, we can safely put it out the integration, yielding: $$W = PV^k\int V^{-k}dV = PV^k\left[\frac{V^{-k+1}}{1-k}\right]^{V_f}_{V_i}$$$$W = PV^k\int V^{-k}\,dV = PV^k\left[\frac{V^{-k+1}}{1-k}\right]^{V_f}_{V_i}$$

Finally, putting $$V_f = V_2$$ and $$V_i = V_1$$: $$W = \frac{(P_2V_2 - P_1V_1)} {(1-k)}$$

It's just a sign convention, if work is done by a system work is positive, if work is done on a system work is negative (as in your case).

what am I missing?

When I tried to solve the problem I got the same result as yours. Are you sure there is nothing missing in the problem description?

Is my relation correct?

Yes, it's correct. And here is the derivation:

mechanical work by definition is defined as: $$W = \int_{V_i}^{V_f}PdV$$

multiplying by $$\frac{V^{k}}{V^{k}}$$: $$W = \int_{V_i}^{V_f}\frac{PV^{k}}{V^{k}}dV$$

Since $$PV^{k}$$ is constant, we can safely put it out the integration, yielding: $$W = PV^k\int V^{-k}dV = PV^k\left[\frac{V^{-k+1}}{1-k}\right]^{V_f}_{V_i}$$

Finally, putting $$V_f = V_2$$ and $$V_i = V_1$$: $$W = \frac{(P_2V_2 - P_1V_1)} {(1-k)}$$

It's just a sign convention, if work is done by a system work is positive, if work is done on a system work is negative (as in your case).

what am I missing?

When I tried to solve the problem I got the same result as yours. Are you sure there is nothing missing in the problem description?

Is my relation correct?

Yes, it's correct. And here is the derivation:

mechanical work by definition is defined as: $$W = \int_{V_i}^{V_f}PdV$$

multiplying by $$\frac{V^{k}}{V^{k}}$$: $$W = \int_{V_i}^{V_f}\frac{PV^{k}}{V^{k}}dV$$

Since $$PV^{k}$$ is constant, we can safely put it out the integration, yielding: $$W = PV^k\int V^{-k}dV = PV^k\left[\frac{V^{-k+1}}{1-k}\right]^{V_f}_{V_i}$$

Finally, putting $$V_f = V_2$$ and $$V_i = V_1$$: $$W = \frac{(P_2V_2 - P_1V_1)} {(1-k)}$$