Suppose that we have a set of items and a set of devices, each possessing two limited resources. Each item requires a given amount of the resources. Further, each item is associated with a profit and a color, and items of the same color can {\em share} the use of one resource. We need to allocate the resources to the most profitable (feasible) subset of items. In alternative formulation, we need to {\em pack} the most profitable subset of items in a set of $2$-dimensional bins (knapsacks), in which the capacity in one dimension is {\em sharable}. Indeed, the special case where we have a single item in each color is the well-known {\em $2$-dimensional vector packing ($2$DVP)} problem. Thus, the problem that we study is strongly NP-hard for a single bin, and MAX-SNP hard for multiple bins. Our problem has several important applications, including {\em data placement} on disks in media-on-demand systems. We present approximation algorithms as well as optimal solutions for some instances. In some cases, our results are similar to the best known results for $2$DVP. Specifically, for a single knapsack, we show that our problem is solvable in pseudo-polynomial time and develop a {\em polynomial time approximation scheme (PTAS)} for general instances. For a natural subclass of instances we obtain a simpler scheme. This yields the first {\em combinatorial} PTAS for a non-trivial subclass of instances for $2$DVP. For multiple knapsacks, we develop a PTAS for a subclass of instances arising in the data placement problem. Finally, we show that when the number of distinct colors in the instance is fixed, our problem admits a PTAS, even if the items have arbitrary sizes and profits, and the bins are arbitrary.