Let A and B be the magnitude of two vectors and let A>B.
When act in opposite direction, the magnitude of resultant is A - B
A - B = 7 [Given] ...(1)
When act perpendicular to each other, then their resultant is,
On solving equation (1) and (3), we get
A = 12 and B = 5