@Emili Lion Very, very basically, they have arranged a paper marriage; Liberty will be legally married to the Prince (her grandfather) but there will be no husband/wife relationship between them. They will be spouses in name only, while living as grandfather, granddaughter and great-granddaughter.
The Prince is an aged and physically unwell man who doesn't have a very long time to live, but he is still royalty and thus is afforded a level of privacy and security that Liberty and Tiania now receive too, which will hopefully keep them safe and hidden from the Queen Dowager (the Prince's Mother, Al's Grandmother) who might be tempted to 'erase past mistakes' and have them killed.
A widow is looked on far more favourably than a single mother or a divorcee, so even when the Prince passes on, Liberty won't be slandered as a loose or untrustworthy woman, especially as Tiania will be claimed as the Prince's child, which will give Liberty the option to marry in future while getting to stay with Tiania.