You do not need the preposition "к" in this sentence.
'my friend' is in the dative case since it is the indirect object, and you do need to decline both words (like you already did), the noun and the adjectives that describe it will always match in case, number, and gender.
'собаку' is in the accusative since it is the direct object of the sentence.