A magic square should be filled with the following numbers: 7,8,9,11,12,13,15,16,17. The numbers: 15, 16 and 17 are already placed as the following:
$$\begin{array}{|c|c|c|} \hline &17\\ \hline 15&&\\ \hline &&16\\ \hline\end{array}$$
Which algorithm should be used to fill such that magic square?
You are given that all the rows sum to the same number. If you add up all the numbers in the three rows, you get all the numbers in the matrix. The sum is $7+8+9+11+12+13+15+16+17=108$. The magic constant must then be $\frac {108}3=36$.
To make a sum of $36$ with $17$ included, the only possibilities are $7+12+17$ and $8+11+17$, so either the top row is $8,11,17$ in some order and the center column is $7,12,17$ in some order, or they are reversed.
To make a sum of $36$ with $15$ included, the only possibilities are $9+12+15$ and $8+13+15$. The upper left and center squares must be $8$ and $12$ because these are the only numbers common to the sums for $15$ and $17$.
If we make the upper left $12$, the center is $8$ , the middle in the right column is $13$, the top right is $7$ from the rows, and the right column fails. $$\begin{array}{|c|c|c|} \hline 12 &17&7\\ \hline 15&8&13\\ \hline &&16\\ \hline\end{array}$$so the upper left must be $8$ and the center $12$. From there it is easy to fill in the rest.
$$\begin{array}{|c|c|c|} \hline 8&17&11\\ \hline 15&12&9\\ \hline 13&7&16\\ \hline\end{array}$$