To be "in the same direction" means that the vector you're looking for has the same ratio of components i and j as the original vector. You're starting with the vector , whose magnitude is . So to have a vector of magintude 3 in the same direction simply multiply through by .
To be in the opposite direction of a given vector, simply reverse the signs or the and components. So the opposite of vector is: . Then apply the same length correction as above.