import random


def generate_random_offset(background_shape: tuple, object_shape: tuple) -> tuple:
    """
    Generate a safe random offset for the background.
    :param background_shape: tuple
    :param object_shape: tuple
    :return: tuple - offset in x, y
    """
    b_height, b_width = background_shape
    o_height, o_width = object_shape

    random_x = random.randrange(0, b_width - o_width, 1)
    random_y = random.randrange(0, b_height - o_height, 1)
    return random_x, random_y