Firstly, let us consider "the probability of obtaining a total of 7".
Let T = total obtained by two die rolls.
Considering Pr(T=7), that means that you need 1+6, 2+5 or 3+4. Conversely, this may be obtained with 6+1, 5+2, and 4+3.
This means that you have 6 possible outcomes in which you may get Pr(T=7).
Pr(T=7) = 2xPr(1&6) + 2xPr(3&4) + 2xPr(5&2)
Consider 1&6. Pr(1) = (1-k)/10 and Pr(6) = k/10
The probability of rolling a 1 and THEN a 6 is Pr(1) x Pr(6) = k(1-k)/10
therefore, Pr(1&6) = k(1-k)/100
Pr(2&5) = 3/10 x 1/10 = 3/100
Pr(3&4) = 1/5 x 3/10 = 3/50
Remember, Pr(T=7) = 2xPr(1&6) + 2xPr(2&5) + 2xPr(3&4)
= k(1-k)/50 + 3/50 + 3/25
= k(1-k)/50 + 9/50
= (k - k^2)/50 + 9/50
We now have a formula for Pr(T=7)! But the question stipulates that it wants a MAXIMUM (here is where the question turns from a probability question into a calculus max/min problem)
Consider the graph of Pr(T=7) = y = (k-k^2)/50 + 9/50
= (9 + k - k^2)/50
It is an inverted parabola. Thus, the maximum occurs when dy/dk = 0
So dy/dk = (1-2k)/50
Set dy/dk = 0
And you obtain 1 - 2k = 0 and k = 1/2