Solving for k would not usually use log rules, but we can do it both ways to show differences:
Divide both sides by 2π: T/2π = √(m/k)
Take the log of both sides (usually we use natural log): ln (T/2π) = ln (√m/k)
Use log rule (treating the sq. root as an exponent = 1/2): ln (T/2π) = 1/2 ln (m/k)
Multiply by 2: 2ln (T/2π) = ln (m/k)
Use log rule for quotients: 2ln (T/2π) = ln (m) - ln (k)
Isolate ln(k): ln(k) = ln (m) - 2ln (T/2π)
Use log rules again on right (his time in reverse): ln(k) = ln (m/(T/2π)2)
Fraction rule: ln(k) = ln (4π2m/T2)
Take e to the power of both sides to get rid of lns: k = 4π2m/T2
That is incredibly cumbersome compared to just squaring:
T/2π = √(m/k)
T2/4π2 = m/k
4π2/T2 = k/m
k = 4π2m/T2