Step 1: Use the condition that the given lines are perpendicular.
The slopes of the lines are
\[
m_1 = -\frac{1}{k-1}, \qquad m_2 = -\frac{2}{k^2}.
\]
Since the lines are perpendicular,
\[
m_1m_2 = -1.
\]
So,
\[
\left(-\frac{1}{k-1}\right)\left(-\frac{2}{k^2}\right) = -1.
\]
Hence,
\[
\frac{2}{k^2(k-1)} = -1.
\]
Therefore,
\[
k^2(k-1) = -2
\]
\[
k^3 - k^2 + 2 = 0.
\]
On factorising,
\[
(k+1)(k^2-2k+2)=0.
\]
Thus, the only real value of \( k \) is
\[
k=-1.
\]
Step 2: Find the point of intersection of the two lines.
Substituting \( k=-1 \), the lines become
\[
x-2y+3=0
\]
and
\[
2x+y-4=0.
\]
From the second equation,
\[
y=4-2x.
\]
Substitute into the first equation:
\[
x-2(4-2x)+3=0
\]
\[
x-8+4x+3=0
\]
\[
5x-5=0
\]
\[
x=1.
\]
Then,
\[
y=4-2(A)=2.
\]
So, the centre of the circle is
\[
C(1,2).
\]
Step 3: Find the radius of the circle.
The circle passes through the origin \( O(0,0) \).
Hence, radius is the distance between \( C(1,2) \) and \( O(0,0) \):
\[
r=\sqrt{(1-0)^2+(2-0)^2}=\sqrt{1+4}=\sqrt{5}.
\]
So,
\[
r^2=5.
\]
Step 4: Find the perpendicular distance from the centre to the chord line.
The chord is given by
\[
x-y+2=0.
\]
Distance of point \( (1,2) \) from this line is
\[
d=\frac{|1-2+2|}{\sqrt{1^2+(-1)^2}}=\frac{1}{\sqrt{2}}.
\]
Thus,
\[
d^2=\frac{1}{2}.
\]
Step 5: Use the chord length formula.
For a chord at distance \( d \) from the centre of a circle of radius \( r \),
\[
AB = 2\sqrt{r^2-d^2}.
\]
Therefore,
\[
(AB)^2 = 4(r^2-d^2).
\]
Substituting the values,
\[
(AB)^2 = 4\left(5-\frac{1}{2}\right)
\]
\[
=4\left(\frac{9}{2}\right)
\]
\[
=18.
\]
Final Answer: \( 18 \)