First, you have to calculate the dot product of a (2, 5) and b(1, 3)
a · b = (2, 5) · (1, 3) = 2×1 + 5×3 = 17
Then, you have to calculate the magnitude of b
|b| = √(1² + 3²) = √10
The scalar projection will be:
sp = (a · b) / |b| = 17/√10 = (17√10)/10
The vector projection will be:
vp = [(a · b) / |b|² ] b = 17/10 (1, 3) = (17/10, 51/10)