-ㄹ래 is a propositive marker, and it is used to request for the listener to perform an action.
-ㄹ까 is an interrogative marker, and it is used to ask a question.
In some contexts, they can be used interchangeably to deliver the same practical meaning. For example, "집에 갈래?" and "집에 갈까?" can both be used to say "Shall we go home?" However, this is not the only meaning of the Korean sentences. The subject of the Korean sentence is implicit, and can be different given the context. For example, "집에 갈래?" can mean "Do you want to go home?" if the implicit subject is "너/you", not "우리/we". "집에 갈까?" can mean "Shall I go home?" if the implicit subject is "나/I", not "우리/we".
See the example that confused you:
Person 1: 집에 늦게 갈래요? Shall we go home late?
This sentence is an explicit proposal to ask the listener for an action. The same sentence can be used for "Shall you go home late?", or in more natural English, "Do you want to go home late?" Of course, it is also a question at the same time, so "집에 늦게 갈까요?" does also work to mean "Shall we go home late?" However, given a different context, "집에 늦게 갈까요?" might also mean "Shall I go home late?" or "Do you want me to go home late?"
Person 2: 그럴까? Sure, shall we do (it like that)?
This sentence is formed as a question. Of course, one can convey the same practical meaning with "그럴래?"
So in short, -ㄹ래 is used to ask the listener for an action, and -ㄹ까 is used to ask the listener a question. They be used interchangeably in some situation/context, but may mean different things in others.