If my memory serves me right, a square pyramid triangles are
equilateral, because of the square base. So you can just use
Pythagoras' Theorem to work out the height and base...

See if you get this picture...
Show you some workings using my picture and your numbers... not
sure if I'm right though, I have not touched it for 2 years.

pyramid's height is 12cm and haf 10 cm for length and breath
Since the triangle is an equilateral triangle, drawing a line
down from the middle would result in equal halves. This would also
give you 2 right angle triangles.
Using Pythagoras' Theorem would be
a^2 = b^2 + c^2 = 12^2 + 5^2 = 169
sqrt of a^2 = 13
Somebody got to correct me...