Need help understanding this exercise's solution We were given this exercise, which asks us to identify the types of keys used on this diagram:



The solution was

Kxa -> A's private key

Kya -> A's public key

KxB -> B's private key

My question is, how is it possible that B knows the contents the first message coming from A since it was encrypted with A's private key ? 
Also, B replies back to A encrypting the message with A's public key which is encrypting a message using B's private key.. I thought private keys were meant to be used to decrypt messages ecrypted by public keys.

I dont understand how come they know each other's private keys.
OK, so this takes a bit of guessing, but I'm assuming the following:


A is the identity of A, which can be used to select the right public key of A;
Kxa() is a signing operation (with message recovery) that signs the random Ra and a tag Ts which is used as proof;
Kya() is an encryption operation with the public key A, so that the session key Ks is kept confidential;
Kxb() is a signing operation (with message recovery) that signs the random Ra together with session key Ks;
Ks(M) is message encryption with the established session key Ks.


The general idea seems to be to perform authentication of both parties and session key establishment for message transport security.