A: This is a rectangular pyramid. This is because once a square is divided in half, all of the side lengths are no longer equilateral, being only half as wide as they are long.
B: This becomes a triangular pyramid. If it's perpendicular to the base, that means that it bisects the angle of the square, thus creating taking away one vertex of the complete shape.